import { ElTable, ElTableColumn } from 'element-plus'; import type { Meta, StoryObj } from '@storybook/vue3'; const meta: Meta = { title: 'Data/Table 表格', component: ElTable, args: { stripe: true, }, } export default meta; type Story = StoryObj; const defaultArgs = { data: [ { id: 0, user_name: '看见网络科技(上海)有限公司', client_id: 'HW1719-J012', user_email: 'abc@kanjian.com', type: '国内大合同', status: '未生效', }, { id: 0, user_name: '看见网络科技(上海)有限公司看见网络科技(上海)有限公司', client_id: 'HW1719-J012', user_email: 'abc@kanjian.com', type: '国内大合同', status: '生效中', }, { id: 0, user_name: 'NeoBaran', client_id: 'HW1719-J012', user_email: 'abc@kanjian.com', type: '国内大合同', status: '已过期', }, ], }; export const Overview: Story = { render: (args) => ({ components: { ElTable, ElTableColumn, }, setup() { return { args }; }, template: ` `, }), args: defaultArgs, }; Overview.args = { data: [ { id: 0, user_name: '看见网络科技(上海)有限公司', client_id: 'HW1719-J012', user_email: 'abc@kanjian.com', type: '国内大合同', status: '未生效', }, { id: 0, user_name: '看见网络科技(上海)有限公司看见网络科技(上海)有限公司', client_id: 'HW1719-J012', user_email: 'abc@kanjian.com', type: '国内大合同', status: '生效中', }, { id: 0, user_name: 'NeoBaran', client_id: 'HW1719-J012', user_email: 'abc@kanjian.com', type: '国内大合同', status: '已过期', }, ], }; export const Empty: Story = { render: (args) => ({ components: { ElTable, ElTableColumn, }, setup() { return { args }; }, template: ` `, }), args: { emptyText: '暂无数据', data: [], }, };