From 22685fc298120fc70ae0bb40f3c5f29cdcea6e0e Mon Sep 17 00:00:00 2001 From: Halo Dev Bot <87291978+halo-dev-bot@users.noreply.github.com> Date: Wed, 7 Dec 2022 11:34:54 +0800 Subject: [PATCH] [release-2.0] fix: the issue that custom link type menu items cannot be saved normally (#751) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an automated cherry-pick of #743 /assign JohnNiang ```release-note 修复 Console 端无法正常创建自定义链接类型菜单项的问题。 ``` --- .../interface/menus/components/MenuItemEditingModal.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/interface/menus/components/MenuItemEditingModal.vue b/src/modules/interface/menus/components/MenuItemEditingModal.vue index 22e79e7a..a4f3ba68 100644 --- a/src/modules/interface/menus/components/MenuItemEditingModal.vue +++ b/src/modules/interface/menus/components/MenuItemEditingModal.vue @@ -60,11 +60,13 @@ const handleSaveMenuItem = async () => { (ref) => ref.ref?.kind === selectedRefKind.value ); - if (menuItemRef) { + if (menuItemRef?.ref) { formState.value.spec.targetRef = { ...menuItemRef.ref, name: selectedRefName.value, }; + formState.value.spec.displayName = undefined; + formState.value.spec.href = undefined; } if (isUpdateMode.value) {