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
| import type { VbenFormSchema } from '#/adapter/form';
|
| import { beginOfDay, endOfDay, formatDateTime } from '..\..\..\packages\utils\src';
|
| /** 列表的搜索表单 */
| export function useGridFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'accountId',
| label: '公众号',
| component: 'Input',
| },
| {
| fieldName: 'dateRange',
| label: '时间范围',
| component: 'RangePicker',
| componentProps: {
| format: 'YYYY-MM-DD',
| valueFormat: 'YYYY-MM-DD HH:mm:ss',
| },
| defaultValue: [
| formatDateTime(beginOfDay(new Date(Date.now() - 3600 * 1000 * 24 * 7))),
| formatDateTime(endOfDay(new Date(Date.now() - 3600 * 1000 * 24))),
| ],
| },
| ];
| }
|
|