From 3d1cf71ff14611bbf9ffc1d8d3bf68dbd0dcb288 Mon Sep 17 00:00:00 2001 From: zhaojinfeng <121016171@qq.com> Date: Thu, 13 Jul 2023 16:25:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20extra=E6=8F=92=E6=A7=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/card/index.vue | 28 ++++++++++++++++++++---- stories/Card.stories.ts | 48 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 69 insertions(+), 7 deletions(-) diff --git a/packages/card/index.vue b/packages/card/index.vue index f511fbf..1287058 100644 --- a/packages/card/index.vue +++ b/packages/card/index.vue @@ -2,14 +2,24 @@ * @Author: peerless_hero peerless_hero@outlook.com * @Date: 2023-07-08 01:36:19 * @LastEditors: zhaojinfeng 121016171@qq.com - * @LastEditTime: 2023-07-13 12:06:10 + * @LastEditTime: 2023-07-13 16:19:22 * @FilePath: \uni\packages\card\index.vue * @Description: * --> @@ -17,14 +27,24 @@ diff --git a/stories/Card.stories.ts b/stories/Card.stories.ts index 54378e6..c65e0d8 100644 --- a/stories/Card.stories.ts +++ b/stories/Card.stories.ts @@ -1,17 +1,28 @@ +/* + * @Author: zhaojinfeng 121016171@qq.com + * @Date: 2023-07-10 14:39:45 + * @LastEditors: zhaojinfeng 121016171@qq.com + * @LastEditTime: 2023-07-13 16:23:26 + * @FilePath: \uni\stories\Card.stories.ts + * @Description: + * + */ import type { Meta, StoryObj } from '@storybook/vue3' import ThCard from '../packages/card/index.vue' import ThCardTitle from '../packages/card-title/index.vue' +import ThCardText from '../packages/card-text/index.vue' +import ThTag from '../packages/tag/index.vue' const meta = { title: '卡片/Card', component: ThCard, tags: ['autodocs'], - render: (args: any) => ({ + render: args => ({ components: { ThCard }, setup() { return { args } }, - template: '
', + template: '', }), } satisfies Meta export default meta @@ -19,13 +30,16 @@ export default meta type Story = StoryObj export const Title: Story = { + args: { + noShadow: false, + }, render: (args: any) => ({ components: { ThCard, ThCardTitle }, setup() { return { args } }, template: ` - + Title @@ -33,3 +47,31 @@ export const Title: Story = { `, }), } + +export const TitleExtra: Story = { + render: args => ({ + components: { ThCard, ThCardText, ThTag }, + setup() { + return { args } + }, + template: ` + + + Text + + + Text + + + Text + + + Text + + + + `, + }), +}