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:
17
packages/effects/plugins/src/vxe-table/formatter.ts
Normal file
17
packages/effects/plugins/src/vxe-table/formatter.ts
Normal 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');
|
||||
},
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user