Skip to content

Commit 88a2f76

Browse files
authored
Merge pull request #444 from Tencent/fix/progress/demo
fix(progress): [demo] control percentage value is in [0, 100]
2 parents a6c6ed3 + a6e5cab commit 88a2f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/progress/_example/progress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Page({
55

66
clickAdd() {
77
this.setData({
8-
percentage: this.data.percentage + 10,
8+
percentage: Math.min(this.data.percentage + 10, 100),
99
});
1010
},
1111

0 commit comments

Comments
 (0)