From ebe27159e816bddc87b85d39d8ce30470319e4a4 Mon Sep 17 00:00:00 2001 From: peerless_hero Date: Tue, 11 Jul 2023 04:05:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=8D=E9=A6=88=E7=BB=84=E4=BB=B6/Co?= =?UTF-8?q?nfirm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/confirm/index.vue | 112 +++++++++++++++++++++++++++++++++++++ stories/Confirm.stories.ts | 42 ++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 packages/confirm/index.vue create mode 100644 stories/Confirm.stories.ts diff --git a/packages/confirm/index.vue b/packages/confirm/index.vue new file mode 100644 index 0000000..7732442 --- /dev/null +++ b/packages/confirm/index.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/stories/Confirm.stories.ts b/stories/Confirm.stories.ts new file mode 100644 index 0000000..7af74ef --- /dev/null +++ b/stories/Confirm.stories.ts @@ -0,0 +1,42 @@ +/* + * @Author: peerless_hero peerless_hero@outlook.com + * @Date: 2023-07-11 01:15:23 + * @LastEditors: peerless_hero peerless_hero@outlook.com + * @LastEditTime: 2023-07-11 03:43:39 + * @FilePath: \uni\stories\Confirm.stories.ts + * @Description: + * + */ +import type { Meta, StoryObj } from '@storybook/vue3' +import ThConfirm from '../packages/confirm/index.vue' + +const meta = { + title: '反馈组件/Confirm', + component: ThConfirm, + tags: ['autodocs'], + args: { + modelValue: true, + title: '确认提示', + content: '是否执行此操作?', + confirmText: '确定', + cancelText: '取消', + showConfirm: true, + showCancel: true, + }, + argTypes: { + onConfirm: { action: 'clicked' }, + onCancel: { action: 'clicked' }, + }, +} satisfies Meta + +export default meta + +type Story = StoryObj + +export const OnlyConfirm: Story = { + name: '仅提示', + args: { + content: '提示描述', + showCancel: false, + }, +}