1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-01-02 14:20:21 +08:00

feat: 外链可内嵌打开

This commit is contained in:
zclzone
2024-03-15 16:20:38 +08:00
parent fd9480e92f
commit 04723ffbfa
6 changed files with 86 additions and 5 deletions

View File

@@ -39,8 +39,19 @@ watch(route, async () => {
})
function handleMenuSelect(key, item) {
if (isExternal(item.path)) {
window.open(item.path)
if (isExternal(item.originPath)) {
$dialog.confirm({
type: 'info',
title: `请选择打开方式`,
positiveText: '外链打开',
negativeText: '在本站内嵌打开',
confirm() {
window.open(item.originPath)
},
cancel: () => {
router.push(item.path)
},
})
} else {
router.push(item.path)
}