From 24045455e8120fecd887244601a2e610a2e1aeb1 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Sat, 21 Dec 2024 19:21:30 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8B=BF?= =?UTF-8?q?=E5=88=B0=E7=9A=84=E6=98=AFreadonly=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=E5=A6=82=E6=9E=9C=E9=9C=80=E8=A6=81=E4=BF=AE=E6=94=B9=20?= =?UTF-8?q?=E9=9C=80=E8=A6=81cloneDeep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/effects/plugins/src/vxe-table/use-vxe-grid.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue index 4c725480..9776cd40 100644 --- a/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue +++ b/packages/effects/plugins/src/vxe-table/use-vxe-grid.vue @@ -246,7 +246,11 @@ 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 ?? {}); + // 第一次拿到的是readonly的数据 如果需要修改 需要cloneDeep + props.api.grid.commitProxy?.( + '_init', + cloneDeep(formApi.form?.values) ?? {}, + ); // props.api.reload(formApi.form?.values ?? {}); }