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 @@ + + + +