mirror of https://github.com/halo-dev/halo-admin
[release-2.0] fix: the issue that custom link type menu items cannot be saved normally (#751)
This is an automated cherry-pick of #743 /assign JohnNiang ```release-note 修复 Console 端无法正常创建自定义链接类型菜单项的问题。 ```pull/752/head
parent
40765be2e2
commit
22685fc298
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue