From b07ed843fc971ae3c8316a780a3acc185f2d65d2 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 25 Dec 2020 10:42:10 +0800 Subject: [PATCH] The component of the menu only needs to set the default value in the non-edit state --- .../menus/components/CreateOrUpdateMenuDialog.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue b/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue index d9883f0ec..fea5c5eed 100644 --- a/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue +++ b/vueJs/src/views/container/menus/components/CreateOrUpdateMenuDialog.vue @@ -278,10 +278,10 @@ export default class CreateOrUpdateMenuDialog extends Vue { if (layout) { if (!this.isEdit) { this.menu.meta = {} - } - if (!this.parentId) { - // 对于根菜单,自动设置组件路径为布局路径 - this.menu.component = layout.path + if (!this.parentId) { + // 对于根菜单,自动设置组件路径为布局路径 + this.menu.component = layout.path + } } DataService .get(layout.dataId)