fix: 【商城装修】处理热区选择链接之后,当前链接被重置为undefined的问题

pull/795/head
卢越 2025-07-23 17:40:58 +08:00
parent 2a06f6744d
commit f5feea67a5
1 changed files with 6 additions and 2 deletions

View File

@ -80,7 +80,8 @@ const activeAppLink = ref({} as AppLink)
/** 打开弹窗 */ /** 打开弹窗 */
const dialogVisible = ref(false) const dialogVisible = ref(false)
const open = (link: string) => { const open = (link: string) => {
activeAppLink.value.path = link // activeAppLink
activeAppLink.value = { name: '', path: '' }
dialogVisible.value = true dialogVisible.value = true
// //
@ -102,8 +103,11 @@ defineExpose({ open })
// APP // APP
const handleAppLinkSelected = (appLink: AppLink) => { const handleAppLinkSelected = (appLink: AppLink) => {
//
if (!isSameLink(appLink.path, activeAppLink.value.path)) { if (!isSameLink(appLink.path, activeAppLink.value.path)) {
activeAppLink.value = appLink // path 沿 activeAppLink path
const path = appLink.path || activeAppLink.value.path
activeAppLink.value = { ...appLink, path: path }
} }
switch (appLink.type) { switch (appLink.type) {
case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST: case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST: