generated from thzxcx/vue3
feat: 卡片等组件
This commit is contained in:
59
stories/CardTitle.stories.ts
Normal file
59
stories/CardTitle.stories.ts
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: peerless_hero peerless_hero@outlook.com
|
||||
* @Date: 2023-07-08 01:44:23
|
||||
* @LastEditors: peerless_hero peerless_hero@outlook.com
|
||||
* @LastEditTime: 2023-07-10 02:58:09
|
||||
* @FilePath: \uni\stories\CardTitle.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'
|
||||
|
||||
const meta = {
|
||||
title: '卡片/CardTitle',
|
||||
component: ThCardTitle,
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof ThCardTitle>
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Title: Story = {
|
||||
args: {
|
||||
title: '卡片的标题',
|
||||
},
|
||||
render: args => ({
|
||||
components: { ThCard, ThCardTitle },
|
||||
setup() {
|
||||
return { args }
|
||||
},
|
||||
template: `
|
||||
<th-card>
|
||||
<th-card-title :title="args.title" />
|
||||
</th-card>
|
||||
`,
|
||||
}),
|
||||
}
|
||||
|
||||
export const TitleText: Story = {
|
||||
args: {
|
||||
title: '卡片标题配合文字',
|
||||
},
|
||||
render: args => ({
|
||||
components: { ThCard, ThCardTitle, ThCardText },
|
||||
setup() {
|
||||
return { args }
|
||||
},
|
||||
template: `
|
||||
<th-card>
|
||||
<th-card-title :title="args.title" />
|
||||
<th-card-text text="一段文字一段文字" />
|
||||
<th-card-text text="一段文字一段文字" />
|
||||
<th-card-text text="一段文字一段文字" />
|
||||
</th-card>
|
||||
`,
|
||||
}),
|
||||
}
|
Reference in New Issue
Block a user