fix: fix the form-api reactive failure inside the form (#4590)

* fix: fix the form-api reactive failure inside the form
This commit is contained in:
Vben
2024-10-08 22:43:02 +08:00
committed by GitHub
parent 8ad2b8665d
commit 2dbd323b2a
12 changed files with 157 additions and 93 deletions

View File

@@ -0,0 +1,17 @@
import type { VxeUIExport } from 'vxe-table';
import dayjs from 'dayjs';
export function initDefaultFormatter(vxeUI: VxeUIExport) {
vxeUI.formats.add('formatDate', {
tableCellFormatMethod({ cellValue }) {
return dayjs(cellValue).format('YYYY-MM-DD');
},
});
vxeUI.formats.add('formatDateTime', {
tableCellFormatMethod({ cellValue }) {
return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss');
},
});
}