From ca643f210ae1868855428d60de6aa36d1738c67e Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Fri, 11 Aug 2023 15:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/5213=E3=80=91JPopup=E6=8A=9B?= =?UTF-8?q?=E5=87=BAchange=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/jeecg/components/JPopup.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/Form/src/jeecg/components/JPopup.vue b/src/components/Form/src/jeecg/components/JPopup.vue index 9ecefe0..a143933 100644 --- a/src/components/Form/src/jeecg/components/JPopup.vue +++ b/src/components/Form/src/jeecg/components/JPopup.vue @@ -57,7 +57,7 @@ default: () => [], }, }, - emits: ['update:value', 'register'], + emits: ['update:value', 'register', 'change','focus' ], setup(props, { emit, refs }) { const { createMessage } = useMessage(); const attrs = useAttrs(); @@ -67,9 +67,11 @@ //注册model const [regModal, { openModal }] = useModal(); //表单值 - let { groupId, code, fieldConfig } = props; + let {code, fieldConfig } = props; + // update-begin--author:liaozhiyang---date:20230811---for:【issues/675】子表字段Popup弹框数据不更新 //唯一分组groupId - const uniqGroupId = computed(() => (groupId ? `${groupId}_${code}_${fieldConfig[0]['source']}_${fieldConfig[0]['target']}` : '')); + const uniqGroupId = computed(() => (props.groupId ? `${props.groupId}_${code}_${fieldConfig[0]['source']}_${fieldConfig[0]['target']}` : '')); + // update-begin--author:liaozhiyang---date:20230811---for:【issues/675】子表字段Popup弹框数据不更新 /** * 判断popup配置项是否正确 */ @@ -94,6 +96,7 @@ * 打开pop弹出框 */ function handleOpen() { + emit('focus'); !props.disabled && openModal(true); } @@ -121,6 +124,9 @@ props.formElRef && props.formElRef.setFieldsValue(values); //传入赋值方法方式赋值 props.setFieldsValue && props.setFieldsValue(values); + // update-begin--author:liaozhiyang---date:20230811---for:【issues/5213】JPopup抛出change事件 + emit('change', values); + // update-end--author:liaozhiyang---date:20230811---for:【issues/5213】JPopup抛出change事件 } return {