From ebb3e864acd4d5fe045843659f692af66dac13bd Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 23 Aug 2024 13:20:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/app/formPage.vue | 5 +-- .../DesignForm/public/form/formItem.vue | 31 ++++++++++--------- src/views/demo/wangEditor.vue | 2 +- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/components/DesignForm/app/formPage.vue b/src/components/DesignForm/app/formPage.vue index 76640b9..66e9b69 100644 --- a/src/components/DesignForm/app/formPage.vue +++ b/src/components/DesignForm/app/formPage.vue @@ -1083,10 +1083,11 @@ function optionsValue3Get2(data: any,fieldName: string){ }" > - - + + + diff --git a/src/components/DesignForm/public/form/formItem.vue b/src/components/DesignForm/public/form/formItem.vue index a2d9f5b..6570702 100644 --- a/src/components/DesignForm/public/form/formItem.vue +++ b/src/components/DesignForm/public/form/formItem.vue @@ -545,21 +545,24 @@ const judgeIsShow = (key:string) => { return true; }else{ let isShow = false; - props.purview.forEach((item)=>{ - if(item.nodeKey == props.nodeKey){ - - if(item.powerAry && item.powerAry.length > 0){ - item.powerAry.forEach((itm)=>{ - if(itm.id == key){ - // console.log("判断此组件是否可见",itm,itm.id == key,"--------->",itm.isLook) - isShow = itm.isLook - - } - }) + if(Array.isArray(props.purview)){ + props.purview.forEach((item)=>{ + if(item.nodeKey == props.nodeKey){ + + if(item.powerAry && item.powerAry.length > 0){ + item.powerAry.forEach((itm)=>{ + if(itm.id == key){ + // console.log("判断此组件是否可见",itm,itm.id == key,"--------->",itm.isLook) + isShow = itm.isLook + + } + }) + } } - } - - }) + + }) + } + return isShow } }else{ diff --git a/src/views/demo/wangEditor.vue b/src/views/demo/wangEditor.vue index 8f4b5e8..0105d69 100644 --- a/src/views/demo/wangEditor.vue +++ b/src/views/demo/wangEditor.vue @@ -6,6 +6,6 @@ const value = ref("初始内容");