1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| import type { VbenFormSchema } from '#/adapter/form';
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
| import { formatDateTime } from '..\..\..\packages\utils\src';
|
| /** 获取表格列配置 */
| export function useGridColumns(): VxeTableGridOptions['columns'] {
| return [
| {
| field: 'cover',
| title: '图片',
| width: 360,
| slots: { default: 'cover' },
| },
| {
| field: 'title',
| title: '标题',
| slots: { default: 'title' },
| },
| {
| field: 'updateTime',
| title: '修改时间',
| formatter: ({ row }) => {
| return formatDateTime(row.updateTime * 1000);
| },
| },
| {
| title: '操作',
| width: 200,
| fixed: 'right',
| slots: { default: 'actions' },
| },
| ];
| }
|
| /** 列表的搜索表单 */
| export function useGridFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'accountId',
| label: '公众号',
| component: 'Input',
| },
| ];
| }
|
|