fix: 多余的reloadPage
This commit is contained in:
parent
d702a6703b
commit
8f15e1c655
@ -13,13 +13,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { usePermissionStore, useAppStore } from '@/store'
|
import { usePermissionStore } from '@/store'
|
||||||
import { renderCustomIcon, renderIcon, isExternal } from '@/utils'
|
import { renderCustomIcon, renderIcon, isExternal } from '@/utils'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const curRoute = useRoute()
|
const curRoute = useRoute()
|
||||||
const permissionStore = usePermissionStore()
|
const permissionStore = usePermissionStore()
|
||||||
const appStore = useAppStore()
|
|
||||||
|
|
||||||
const activeKey = computed(() => curRoute.meta?.activeMenu || curRoute.name)
|
const activeKey = computed(() => curRoute.meta?.activeMenu || curRoute.name)
|
||||||
|
|
||||||
@ -97,14 +96,10 @@ function getIcon(meta) {
|
|||||||
function handleMenuSelect(key, item) {
|
function handleMenuSelect(key, item) {
|
||||||
if (isExternal(item.path)) {
|
if (isExternal(item.path)) {
|
||||||
window.open(item.path)
|
window.open(item.path)
|
||||||
} else {
|
|
||||||
if (item.path === curRoute.path) {
|
|
||||||
appStore.reloadPage()
|
|
||||||
} else {
|
} else {
|
||||||
router.push(item.path)
|
router.push(item.path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
Loading…
Reference in New Issue
Block a user