diff --git a/src/pages/countTo/Index.vue b/src/pages/countTo/Index.vue index 01b1bd1c..32ee10a3 100644 --- a/src/pages/countTo/Index.vue +++ b/src/pages/countTo/Index.vue @@ -12,7 +12,7 @@ - + diff --git a/src/uni_modules/wot-design-uni/components/wd-text/wd-text.vue b/src/uni_modules/wot-design-uni/components/wd-text/wd-text.vue index 66f5de92..8a8df018 100644 --- a/src/uni_modules/wot-design-uni/components/wd-text/wd-text.vue +++ b/src/uni_modules/wot-design-uni/components/wd-text/wd-text.vue @@ -43,8 +43,9 @@ watch( }), ({ type }) => { // 验证 type 属性 - if (type && !['primary', 'error', 'warning', 'success', 'default'].includes(type)) { - console.error(`type must be one of ${type.toString()}`) + const types = ['primary', 'error', 'warning', 'success', 'default'] + if (type && !types.includes(type)) { + console.error(`type must be one of ${types.toString()}`) } computeTextClass() },