From df611571c7643d8e5ca7402fb42aee85d265bc0c Mon Sep 17 00:00:00 2001 From: roymondchen Date: Wed, 7 Jan 2026 14:43:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(form):=20type=E9=85=8D=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E6=97=B6,=E5=8F=82=E6=95=B0=E4=B8=AD?= =?UTF-8?q?=E7=9A=84model=E7=AD=89=E5=AF=B9=E8=B1=A1=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=B1=82readonly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/form/src/utils/form.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/form/src/utils/form.ts b/packages/form/src/utils/form.ts index 823acd8b..ba44ffb1 100644 --- a/packages/form/src/utils/form.ts +++ b/packages/form/src/utils/form.ts @@ -16,6 +16,7 @@ * limitations under the License. */ +import { readonly } from 'vue'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import { cloneDeep } from 'lodash-es'; @@ -209,10 +210,10 @@ export const filterFunction = ( ) => { if (typeof config === 'function') { return (config as FilterFunction)(mForm, { - values: mForm?.initValues || {}, - model: props.model, - parent: mForm?.parentValues || {}, - formValue: mForm?.values || props.model, + values: readonly(mForm?.initValues || {}), + model: readonly(props.model), + parent: readonly(mForm?.parentValues || {}), + formValue: readonly(mForm?.values || props.model), prop: props.prop, config: props.config, index: props.index,