Files
uni/stories/CardActions.stories.ts
2023-07-10 19:26:19 +08:00

48 lines
1.5 KiB
TypeScript

/*
* @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>
`,
}),
}