Files
iot-device-management-frontend/apps/web-antd/src/views/mp/draft/data.ts

46 lines
960 B
TypeScript
Raw Normal View History

2025-11-05 17:01:42 +08:00
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
2025-11-21 18:19:42 +08:00
import { formatDateTime } from '@vben/utils';
2025-11-05 17:01:42 +08:00
/** 获取表格列配置 */
export function useGridColumns(): VxeTableGridOptions['columns'] {
return [
{
2025-11-21 18:19:42 +08:00
field: 'cover',
title: '图片',
width: 360,
slots: { default: 'cover' },
},
{
field: 'title',
title: '标题',
slots: { default: 'title' },
},
{
field: 'updateTime',
title: '修改时间',
formatter: ({ row }) => {
return formatDateTime(row.updateTime * 1000);
},
2025-11-05 17:01:42 +08:00
},
{
title: '操作',
width: 200,
fixed: 'right',
slots: { default: 'actions' },
},
];
}
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'accountId',
label: '公众号',
component: 'Input',
2025-11-05 17:01:42 +08:00
},
];
}