This commit is contained in:
李志鹏
2025-10-16 15:53:47 +08:00
parent b56f8bd03e
commit 2571a1c89e
3 changed files with 32 additions and 11 deletions

View File

@@ -22,17 +22,17 @@
message: 'The current page has not been saved. Do you want to return to the home page?'
})
.then(() => {
router.push(nav.path)
nav.path && router.push(nav.path)
})
.catch(() => {})
}
const navs = [
{ label: 'Home', icon: 'home', size: 73, path: '/welcome', on: onHome },
{ label: 'Library', icon: 'library', size: 53, path: '/workshop/library' },
{ label: 'Profile', icon: 'profile', size: 55, path: '/workshop/creation' }
{ label: 'Profile', icon: 'profile', size: 55, path: '' }
]
const onNavClick = (nav) => {
if (currentRoute.value !== nav.path) nav.on ? nav.on(nav) : router.push(nav.path)
if (currentRoute.value !== nav.path) nav.on ? nav.on(nav) : nav.path && router.push(nav.path)
}
</script>