From 8e607cbaa2de0092c76622d12f80da19d3159f2f Mon Sep 17 00:00:00 2001 From: Gary Fu Date: Sun, 31 Mar 2024 11:06:47 +0800 Subject: [PATCH] =?UTF-8?q?window=E6=8E=A7=E4=BB=B6=E5=A2=9E=E5=8A=A0form?= =?UTF-8?q?=E5=85=B3=E8=81=94=EF=BC=8C=E6=96=B9=E4=BE=BF=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/MockMenus.js | 8 +++ src/components/common-form/index.vue | 6 +- src/components/common-window/index.vue | 26 +++++++- src/components/utils/index.js | 20 +++++- src/route/ToolsRoutes.js | 4 ++ src/views/tools/WindowForms.vue | 87 ++++++++++++++++++++++++++ 6 files changed, 143 insertions(+), 8 deletions(-) create mode 100644 src/views/tools/WindowForms.vue diff --git a/mock/MockMenus.js b/mock/MockMenus.js index 481209d..3ae6947 100644 --- a/mock/MockMenus.js +++ b/mock/MockMenus.js @@ -90,6 +90,14 @@ const allMenus = [ nameCn: '其他示例', nameEn: 'Others', menuUrl: '/tests' + }, + { + id: 25, + parentId: 2, + iconCls: 'TipsAndUpdatesOutlined', + nameCn: '窗口表单示例', + nameEn: 'Window Forms', + menuUrl: '/window-forms' } ] diff --git a/src/components/common-form/index.vue b/src/components/common-form/index.vue index cd78a94..0186b29 100644 --- a/src/components/common-form/index.vue +++ b/src/components/common-form/index.vue @@ -87,9 +87,9 @@ defineExpose({ form }) onMounted(() => { - const windowFormRef = inject('commonWindowForm', null) - if (isRef(windowFormRef)) { - windowFormRef.value = form.value + const commonWindowRef = inject('commonWindow', null) + if (isRef(commonWindowRef)) { + commonWindowRef.value.addForm(form) } }) diff --git a/src/components/common-window/index.vue b/src/components/common-window/index.vue index f6cbaa4..88a5307 100644 --- a/src/components/common-window/index.vue +++ b/src/components/common-window/index.vue @@ -1,7 +1,8 @@ + + + +