mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2026-01-22 23:50:22 +08:00
Compare commits
3 Commits
2.x
...
0a93419eb5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a93419eb5 | ||
|
|
334310d3b7 | ||
|
|
864b537164 |
@@ -13,7 +13,15 @@ const permission = {
|
|||||||
mounted(el, binding) {
|
mounted(el, binding) {
|
||||||
const currentRoute = unref(router.currentRoute)
|
const currentRoute = unref(router.currentRoute)
|
||||||
const btns = currentRoute.meta?.btns?.map(item => item.code) || []
|
const btns = currentRoute.meta?.btns?.map(item => item.code) || []
|
||||||
if (!btns.includes(binding.value)) {
|
let permissionBtns = []
|
||||||
|
|
||||||
|
if (Array.isArray(permissionBtns)) {
|
||||||
|
permissionBtns = binding.value
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
permissionBtns = binding.value?.split(',')
|
||||||
|
}
|
||||||
|
if (!btns.filter(item => permissionBtns.includes(item)).length) {
|
||||||
el.remove()
|
el.remove()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
class="text-14 text-primary text-highlight hover:underline hover:opacity-80"
|
class="text-14 text-primary text-highlight hover:underline hover:opacity-80"
|
||||||
href="https://isme.top"
|
href="https://isme.top"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@click.prevent="message?.info('官网正在火速开发中...')"
|
@click.prevent="handleLinkClick('https://isme.top')"
|
||||||
>
|
>
|
||||||
isme.top
|
isme.top
|
||||||
</a>
|
</a>
|
||||||
@@ -285,5 +285,7 @@ const skillOption = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
const message = $message
|
function handleLinkClick(link) {
|
||||||
|
window.open(link)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user