feat: admin tabs
This commit is contained in:
@@ -5,7 +5,12 @@ useSeoMeta({
|
||||
title: '智能生成',
|
||||
})
|
||||
|
||||
const navList = [
|
||||
const navList: {
|
||||
label: string
|
||||
icon: string
|
||||
to: string
|
||||
admin?: boolean
|
||||
}[] = [
|
||||
{
|
||||
label: '微课视频生成',
|
||||
icon: 'tabler:presentation-analytics',
|
||||
@@ -16,10 +21,17 @@ const navList = [
|
||||
icon: 'i-tabler-video',
|
||||
to: '/aigc/generation/green-screen',
|
||||
},
|
||||
{
|
||||
label: '数字人管理',
|
||||
icon: 'i-tabler-video',
|
||||
to: '/aigc/generation/green-screen',
|
||||
admin: true,
|
||||
},
|
||||
]
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const loginState = useLoginState()
|
||||
|
||||
onMounted(() => {
|
||||
if (route.fullPath === '/aigc/generation') {
|
||||
@@ -42,6 +54,8 @@ onMounted(() => {
|
||||
:icon="item.icon"
|
||||
:label="item.label"
|
||||
:to="item.to"
|
||||
:admin="item.admin"
|
||||
:hide="item.admin && loginState.user.auth_code !== 2"
|
||||
/>
|
||||
</ClientOnly>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user