fix: form fieldMappingTime is not working (#5333)

* fix: form option `fieldMappingTime` is not working

* fix: form merge support `fieldMappingTime`
This commit is contained in:
Netfan
2025-01-09 12:28:33 +08:00
committed by GitHub
parent 16162c01ed
commit 2828e7a7b6
7 changed files with 72 additions and 68 deletions

View File

@@ -5,6 +5,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { Page } from '@vben/common-ui';
import { message } from 'ant-design-vue';
import dayjs from 'dayjs';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getExampleTableApi } from '#/api';
@@ -21,6 +22,7 @@ interface RowType {
const formOptions: VbenFormProps = {
// 默认展开
collapsed: false,
fieldMappingTime: [['date', ['start', 'end']]],
schema: [
{
component: 'Input',
@@ -58,8 +60,9 @@ const formOptions: VbenFormProps = {
label: 'Color',
},
{
component: 'DatePicker',
fieldName: 'datePicker',
component: 'RangePicker',
defaultValue: [dayjs().subtract(-7, 'days'), dayjs()],
fieldName: 'date',
label: 'Date',
},
],