mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
fix: form fieldMappingTime
is not working (#5333)
* fix: form option `fieldMappingTime` is not working * fix: form merge support `fieldMappingTime`
This commit is contained in:
@@ -109,7 +109,7 @@ function useEcharts(chartRef: Ref<EchartsUIType>) {
|
||||
return {
|
||||
renderEcharts,
|
||||
resize,
|
||||
chartInstance
|
||||
chartInstance,
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,8 @@ import type {
|
||||
VxeToolbarPropTypes,
|
||||
} from 'vxe-table';
|
||||
|
||||
import type { SetupContext } from 'vue';
|
||||
|
||||
import type { VbenFormProps } from '@vben-core/form-ui';
|
||||
|
||||
import type { ExtendedVxeGridApi, VxeGridProps } from './types';
|
||||
@@ -68,18 +70,18 @@ const {
|
||||
|
||||
const { isMobile } = usePreferences();
|
||||
|
||||
const slots = useSlots();
|
||||
const slots: SetupContext['slots'] = useSlots();
|
||||
|
||||
const [Form, formApi] = useTableForm({
|
||||
compact: true,
|
||||
handleSubmit: async () => {
|
||||
const formValues = formApi.form.values;
|
||||
const formValues = await formApi.getValues();
|
||||
formApi.setLatestSubmissionValues(toRaw(formValues));
|
||||
props.api.reload(formValues);
|
||||
},
|
||||
handleReset: async () => {
|
||||
await formApi.resetForm();
|
||||
const formValues = formApi.form.values;
|
||||
const formValues = await formApi.getValues();
|
||||
formApi.setLatestSubmissionValues(formValues);
|
||||
props.api.reload(formValues);
|
||||
},
|
||||
@@ -246,7 +248,7 @@ async function init() {
|
||||
const autoLoad = defaultGridOptions.proxyConfig?.autoLoad;
|
||||
const enableProxyConfig = options.value.proxyConfig?.enabled;
|
||||
if (enableProxyConfig && autoLoad) {
|
||||
props.api.grid.commitProxy?.('_init', formApi.form?.values ?? {});
|
||||
props.api.grid.commitProxy?.('_init', (await formApi.getValues()) ?? {});
|
||||
// props.api.reload(formApi.form?.values ?? {});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user