From 5e55da4839677c63534148d4664dbde1c9f950b2 Mon Sep 17 00:00:00 2001 From: Moonofweisheng <1780903673@qq.com> Date: Wed, 6 Nov 2024 21:23:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20=E7=A7=BB=E9=99=A4Switch?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=9A=84size=E6=94=AF=E6=8C=81=E5=9C=A8?= =?UTF-8?q?=E4=B8=8D=E6=8C=87=E5=AE=9Asize=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=E4=BD=BF=E7=94=A8css=E5=8F=98=E9=87=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BB=84=E4=BB=B6=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #516 --- .../wot-design-uni/components/wd-switch/types.ts | 6 ++++-- .../wot-design-uni/components/wd-switch/wd-switch.vue | 8 +++++--- tsconfig.json | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/uni_modules/wot-design-uni/components/wd-switch/types.ts b/src/uni_modules/wot-design-uni/components/wd-switch/types.ts index 5e452486..ad38038a 100644 --- a/src/uni_modules/wot-design-uni/components/wd-switch/types.ts +++ b/src/uni_modules/wot-design-uni/components/wd-switch/types.ts @@ -1,5 +1,5 @@ import type { ExtractPropTypes, PropType } from 'vue' -import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp } from '../common/props' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, numericProp } from '../common/props' export type SwitchBeforeChangeOption = { value: number | string | boolean @@ -47,7 +47,9 @@ export const switchProps = { /** * 大小 */ - size: makeNumericProp(28), + size: { + type: numericProp + }, /** * 在改变前执行的函数 */ diff --git a/src/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue b/src/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue index 2732f40f..118a64fb 100644 --- a/src/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue +++ b/src/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue @@ -15,7 +15,7 @@ export default {