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, + }, +}