From 4cc994aa275f8856ccb4523a2601cb587c569195 Mon Sep 17 00:00:00 2001 From: peerless_hero Date: Tue, 11 Jul 2023 04:05:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B1=95=E7=A4=BA=E7=BB=84=E4=BB=B6/Ta?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/tag/index.vue | 77 ++++++++++++++++++++++++++++++++++++++++++ stories/Tag.stories.ts | 49 +++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 packages/tag/index.vue create mode 100644 stories/Tag.stories.ts diff --git a/packages/tag/index.vue b/packages/tag/index.vue new file mode 100644 index 0000000..91f0d7d --- /dev/null +++ b/packages/tag/index.vue @@ -0,0 +1,77 @@ + + + + + + diff --git a/stories/Tag.stories.ts b/stories/Tag.stories.ts new file mode 100644 index 0000000..d42749c --- /dev/null +++ b/stories/Tag.stories.ts @@ -0,0 +1,49 @@ +/* + * @Author: peerless_hero peerless_hero@outlook.com + * @Date: 2023-07-11 02:12:08 + * @LastEditors: peerless_hero peerless_hero@outlook.com + * @LastEditTime: 2023-07-11 03:02:55 + * @FilePath: \uni\stories\Tag.stories.ts + * @Description: + * + */ +import type { Meta, StoryObj } from '@storybook/vue3' +import ThTag from '../packages/tag/index.vue' + +const meta = { + title: '展示组件/Tag', + component: ThTag, + args: { + text: '默认', + type: 'default', + }, + argTypes: { + type: { control: 'select', options: ['default', 'warning', 'error'] }, + }, + tags: ['autodocs'], +} satisfies Meta +export default meta + +type Story = StoryObj + +export const Default: Story = { + args: { + text: '默认', + type: 'default', + }, +} + +export const Warning: Story = { + args: { + text: '警告', + type: 'warning', + }, +} + +export const ErrorType: Story = { + name: 'Error', + args: { + text: '错误', + type: 'error', + }, +}