From 57fe87e60e2788dd519e622da698bf6591062473 Mon Sep 17 00:00:00 2001 From: Seeridia Date: Thu, 2 Jul 2026 21:11:22 +0800 Subject: [PATCH 1/3] feat(Switch): support shape prop --- .../__snapshots__/switch.test.tsx.snap | 22 ++++----- .../components/switch/__tests__/base.test.tsx | 48 +++++++++++++++++++ packages/components/switch/_example/shape.vue | 13 +++++ packages/components/switch/_usage/props.json | 21 +++++++- packages/components/switch/props.ts | 9 ++++ packages/components/switch/switch.en-US.md | 1 + packages/components/switch/switch.md | 1 + packages/components/switch/switch.tsx | 5 +- packages/components/switch/type.ts | 5 ++ 9 files changed, 111 insertions(+), 14 deletions(-) create mode 100644 packages/components/switch/_example/shape.vue diff --git a/packages/components/switch/__tests__/__snapshots__/switch.test.tsx.snap b/packages/components/switch/__tests__/__snapshots__/switch.test.tsx.snap index bc1d69520b..dbeb7a9d4c 100644 --- a/packages/components/switch/__tests__/__snapshots__/switch.test.tsx.snap +++ b/packages/components/switch/__tests__/__snapshots__/switch.test.tsx.snap @@ -2,7 +2,7 @@ exports[`Switch > :props > :customValue 1`] = `
:props > :customValue 1`] = ` exports[`Switch > :props > :defaultValue 1`] = `
:props > :defaultValue 1`] = ` exports[`Switch > :props > :disabled 1`] = `
:props > :disabled 1`] = ` exports[`Switch > :props > :label 1`] = `
:props > :label 1`] = ` exports[`Switch > :props > :loading 1`] = `
:props > :loading 1`] = ` exports[`Switch > :props > :modelValue 1`] = `
:props > :modelValue 1`] = ` exports[`Switch > :props > :onChange 1`] = `
:props > :onChange 1`] = ` exports[`Switch > :props > :size 1`] = `
:props > :size 1`] = ` exports[`Switch > :props > :value 1`] = `
:props > :value 1`] = ` exports[`Switch > >