From 3754af4c2690a7aa5e69e75dce4d881896542462 Mon Sep 17 00:00:00 2001 From: tiancheng Date: Wed, 28 Feb 2024 19:16:44 +0800 Subject: [PATCH] fixed --- src/components/ma-form/formItem/form-user-select.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/ma-form/formItem/form-user-select.vue b/src/components/ma-form/formItem/form-user-select.vue index c5c46a96..234c19e4 100644 --- a/src/components/ma-form/formItem/form-user-select.vue +++ b/src/components/ma-form/formItem/form-user-select.vue @@ -36,7 +36,6 @@ const props = defineProps({ customField: { type: String, default: undefined } }) - const formModel = inject('formModel') const index = props.customField ?? props.component.dataIndex const value = ref(get(formModel.value, index)) @@ -44,7 +43,7 @@ const value = ref(get(formModel.value, index)) watch( () => get(formModel.value, index), vl => value.value = vl ) watch( () => value.value, v => { if(props.component.multiple === false && v.length === 1) { - v = v.shift(); + v = v.shift(); } set(formModel.value, index, v) index.indexOf('.') > -1 && delete formModel.value[index]