Skip to content

Commit cae2e56

Browse files
docs: ✏️ 移除文档中CountTo不支持的type
1 parent 60c92f2 commit cae2e56

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/pages/countTo/Index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<wd-count-to type="error" prefix="" :startVal="0" :endVal="888888" suffix="%"></wd-count-to>
1313
<wd-count-to type="success" prefix="" :startVal="0" :endVal="888888" suffix="%"></wd-count-to>
1414
<wd-count-to type="warning" prefix="" :startVal="0" :endVal="888888" suffix="%"></wd-count-to>
15-
<wd-count-to type="info" prefix="" :startVal="0" :endVal="888888" suffix="%"></wd-count-to>
15+
<wd-count-to prefix="" :startVal="0" :endVal="888888" suffix="%"></wd-count-to>
1616
</demo-block>
1717

1818
<demo-block title="手动控制">

src/uni_modules/wot-design-uni/components/wd-text/wd-text.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ watch(
4343
}),
4444
({ type }) => {
4545
// 验证 type 属性
46-
if (type && !['primary', 'error', 'warning', 'success', 'default'].includes(type)) {
47-
console.error(`type must be one of ${type.toString()}`)
46+
const types = ['primary', 'error', 'warning', 'success', 'default']
47+
if (type && !types.includes(type)) {
48+
console.error(`type must be one of ${types.toString()}`)
4849
}
4950
computeTextClass()
5051
},

0 commit comments

Comments
 (0)