From 2376fd480f57f47671ebccc7a23d8eba73690c04 Mon Sep 17 00:00:00 2001 From: toby Date: Mon, 19 Aug 2024 14:19:33 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat(Button):=20=E5=A2=9E=E5=8A=A0=E8=99=9A?= =?UTF-8?q?=E6=A1=86=E6=8C=89=E9=92=AE=E6=BC=94=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_common | 2 +- src/button/demos/base.vue | 1 + src/button/demos/status.vue | 1 + src/button/demos/theme.vue | 64 +++++++++++++++++++++---------------- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/_common b/src/_common index 9653e08dc..193828a0b 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 9653e08dcf7a16c7bcc8ceb7a13ff7217265db16 +Subproject commit 193828a0bcfc1f2a1ea4dacd24e281be2e191dd0 diff --git a/src/button/demos/base.vue b/src/button/demos/base.vue index 97fd2e264..d993c6dc8 100644 --- a/src/button/demos/base.vue +++ b/src/button/demos/base.vue @@ -6,6 +6,7 @@
描边按钮 + 虚框按钮 文字按钮
diff --git a/src/button/demos/status.vue b/src/button/demos/status.vue index c7f1b5708..a0e4b9b37 100644 --- a/src/button/demos/status.vue +++ b/src/button/demos/status.vue @@ -6,6 +6,7 @@
描边按钮 + 虚框按钮 文字按钮
diff --git a/src/button/demos/theme.vue b/src/button/demos/theme.vue index dad4ede3a..e59eff07a 100644 --- a/src/button/demos/theme.vue +++ b/src/button/demos/theme.vue @@ -1,38 +1,48 @@ From acd7ecd6678da975df5ef826558a92866f0f12d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 19 Aug 2024 08:10:23 +0000 Subject: [PATCH 2/5] chore: update common --- src/_common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_common b/src/_common index 193828a0b..a2335a9da 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 193828a0bcfc1f2a1ea4dacd24e281be2e191dd0 +Subproject commit a2335a9da1cbbe0dd15c2c449187a4767ddd2e07 From b21d4d642a7db66e19f167135c9a5db527cf31bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Mon, 19 Aug 2024 17:36:10 +0800 Subject: [PATCH 3/5] chore: update snapshot --- .../__test__/__snapshots__/demo.test.jsx.snap | 619 ++++++++++++------ 1 file changed, 414 insertions(+), 205 deletions(-) diff --git a/src/button/__test__/__snapshots__/demo.test.jsx.snap b/src/button/__test__/__snapshots__/demo.test.jsx.snap index e15cde894..a1390cdea 100644 --- a/src/button/__test__/__snapshots__/demo.test.jsx.snap +++ b/src/button/__test__/__snapshots__/demo.test.jsx.snap @@ -82,6 +82,23 @@ exports[`Button > Button baseVue demo works fine 1`] = ` + + + - + - + - -
- + - +
+
- - - - 描边按钮 - - - - - + -
-
- + - + - +
+
- - - - 文字按钮 - - - - -
-
- + - + - + +
+
- - - - 文字按钮 - - - - + + + + 填充按钮 + + + + + + + +
- @@ -1679,6 +1803,24 @@ exports[`Button > Button statusVue demo works fine 1`] = ` + + + + + - `; From 482e3e2eb99a11e4a77e4135f7e135638e16831f Mon Sep 17 00:00:00 2001 From: toby Date: Wed, 21 Aug 2024 09:42:53 +0800 Subject: [PATCH 4/5] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5common=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_common b/src/_common index 193828a0b..41d40c788 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 193828a0bcfc1f2a1ea4dacd24e281be2e191dd0 +Subproject commit 41d40c788e2793b7707ee1ca0719d3d66bba838d From 9b584e3c7369ce6b5748ec581cc681de477b136f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Wed, 21 Aug 2024 14:16:12 +0800 Subject: [PATCH 5/5] docs(button): update doc --- src/button/button.en-US.md | 2 +- src/button/button.md | 2 +- src/button/props.ts | 2 +- src/button/type.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/button/button.en-US.md b/src/button/button.en-US.md index 004c735ab..a3d74ed33 100644 --- a/src/button/button.en-US.md +++ b/src/button/button.en-US.md @@ -18,7 +18,7 @@ size | String | medium | a button has four size。options: extra-small/small/med suffix | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N theme | String | default | button theme。options: default/primary/danger/light | N type | String | button | type of button element in html。options: submit/reset/button | N -variant | String | base | button variant。options: base/outline/dashed/text | N +variant | String | base | variant of button。options: base/outline/dashed/text | N onClick | Function | | Typescript:`(e: MouseEvent) => void`
trigger on click | N ### Button Events diff --git a/src/button/button.md b/src/button/button.md index 66ea191fb..e404be031 100644 --- a/src/button/button.md +++ b/src/button/button.md @@ -18,7 +18,7 @@ size | String | medium | 组件尺寸。可选项:extra-small/small/medium/lar suffix | Slot / Function | - | 右侧内容,可用于定义右侧图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N theme | String | default | 组件风格,依次为品牌色、危险色。可选项:default/primary/danger/light | N type | String | button | 按钮类型。可选项:submit/reset/button | N -variant | String | base | 按钮形式,基础、线框、文字。可选项:base/outline/dashed/text | N +variant | String | base | 按钮形式,基础、线框、虚线、文字。可选项:base/outline/dashed/text | N onClick | Function | | TS 类型:`(e: MouseEvent) => void`
点击时触发 | N ### Button Events diff --git a/src/button/props.ts b/src/button/props.ts index c2dfca545..ac65a51b1 100644 --- a/src/button/props.ts +++ b/src/button/props.ts @@ -71,7 +71,7 @@ export default { return ['submit', 'reset', 'button'].includes(val); }, }, - /** 按钮形式,基础、线框、文字 */ + /** 按钮形式,基础、线框、虚线、文字 */ variant: { type: String as PropType, default: 'base' as TdButtonProps['variant'], diff --git a/src/button/type.ts b/src/button/type.ts index ee904f2ad..1482650f9 100644 --- a/src/button/type.ts +++ b/src/button/type.ts @@ -64,7 +64,7 @@ export interface TdButtonProps { */ type?: 'submit' | 'reset' | 'button'; /** - * 按钮形式,基础、线框、文字 + * 按钮形式,基础、线框、虚线、文字 * @default base */ variant?: 'base' | 'outline' | 'dashed' | 'text';