From cae2e56aba98427b1b6c7a2c3f6a2f9ed8acf96f Mon Sep 17 00:00:00 2001
From: Moonofweisheng <1780903673@qq.com>
Date: Thu, 12 Sep 2024 18:51:45 +0800
Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20=20=E7=A7=BB?=
=?UTF-8?q?=E9=99=A4=E6=96=87=E6=A1=A3=E4=B8=ADCountTo=E4=B8=8D=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E7=9A=84type?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/countTo/Index.vue | 2 +-
.../wot-design-uni/components/wd-text/wd-text.vue | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
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()
},