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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user