generated from thzxcx/vue3
feat: 卡片等组件
This commit is contained in:
47
stories/CardActions.stories.ts
Normal file
47
stories/CardActions.stories.ts
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* @Author: peerless_hero peerless_hero@outlook.com
|
||||
* @Date: 2023-07-08 01:44:59
|
||||
* @LastEditors: zhaojinfeng 121016171@qq.com
|
||||
* @LastEditTime: 2023-07-10 19:09:37
|
||||
* @FilePath: \uni\stories\CardActions.stories.ts
|
||||
* @Description:
|
||||
*
|
||||
*/
|
||||
import type { Meta, StoryObj } from '@storybook/vue3'
|
||||
import ThCard from '../packages/card/index.vue'
|
||||
import ThCardText from '../packages/card-text/index.vue'
|
||||
import ThCardActions from '../packages/card-actions/index.vue'
|
||||
|
||||
const meta = {
|
||||
title: '卡片/CardActions',
|
||||
component: ThCardActions,
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof ThCardActions>
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Actions: Story = {
|
||||
args: {
|
||||
actions: [
|
||||
{
|
||||
text: '编辑',
|
||||
}, {
|
||||
text: '审核',
|
||||
},
|
||||
],
|
||||
},
|
||||
render: args => ({
|
||||
components: { ThCard, ThCardText, ThCardActions },
|
||||
setup() {
|
||||
return { args }
|
||||
},
|
||||
template: `<th-card>
|
||||
<th-card-text label="label" text="一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字" />
|
||||
<th-card-text label="label" text="一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字" />
|
||||
<th-card-text label="label" text="一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字一长段文字" />
|
||||
<th-card-actions :actions="args.actions" />
|
||||
</th-card>
|
||||
`,
|
||||
}),
|
||||
}
|
Reference in New Issue
Block a user