From 3229f6a34f4982d1a551d86e68d313482e33f701 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期三, 11 十二月 2024 14:37:43 +0800 Subject: [PATCH] 条件节点 --- src/layout/routerView/iframes.vue | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/src/layout/routerView/iframes.vue b/src/layout/routerView/iframes.vue index 52406e3..7281a70 100644 --- a/src/layout/routerView/iframes.vue +++ b/src/layout/routerView/iframes.vue @@ -12,17 +12,21 @@ style="position: absolute" :data-url="v.path" v-if="getRoutePath === v.path" + @load="iframeLoad" ref="iframeRef" /> </transition-group> </div> </div> + <AmisPageOptDlg v-model="amisPageShow" :item="amisPageMapRow" @insert="amisPageInsert" @update="amisPageUpdate" /> </div> </template> <script setup lang="ts" name="layoutIframeView"> import { computed, watch, ref, nextTick } from 'vue'; import { useRoute } from 'vue-router'; +import AmisPageOptDlg from '/@/views/project/yw/lowCode/sqlAmis/optDlg/OptDlg.vue'; +import emitter from '/@/utils/mitt'; // 瀹氫箟鐖剁粍浠朵紶杩囨潵鐨勫�� const props = defineProps({ @@ -98,4 +102,32 @@ deep: true, } ); + +const iframeLoad = () => { + setTimeout(() => { + window.frames[0].openOptAmisPageDlg = () => { + amisPageShow.value = true; + }; + window.frames[0].updatePublished = (id, published) => { + emitter.emit('supervisor.publish', { + id, + published, + }); + }; + }, 0); +}; + +//#region ====================== iframe 浜や簰 ====================== +const amisPageShow = ref(false); +const amisPageMapRow = ref(null); + +const amisPageInsert = (...params) => { + window.frames?.[0]?.amisPageInsert?.(...params); +}; + +const amisPageUpdate = (...params) => { + window.frames?.[0]?.amisPageUpdate?.(...params); +}; + +//#endregion </script> -- Gitblit v1.9.3