fix: 非管理员角色不能设置布局样式
This commit is contained in:
@@ -5,6 +5,7 @@ import BaseInfo from './components/base-info.vue';
|
|||||||
import ResetPasswd from './components/reset-passwd.vue';
|
import ResetPasswd from './components/reset-passwd.vue';
|
||||||
import StyleLayout from './components/style-layout.vue';
|
import StyleLayout from './components/style-layout.vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
import { hasRoles } from '@/plugins/auth-user';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@@ -45,14 +46,14 @@ onActivated(() => {
|
|||||||
>
|
>
|
||||||
<ResetPasswd></ResetPasswd>
|
<ResetPasswd></ResetPasswd>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<div v-roles:has="['admin']">
|
|
||||||
<a-tab-pane
|
<a-tab-pane
|
||||||
key="style-layout"
|
key="style-layout"
|
||||||
:tab="t('views.account.settings.styleLayout')"
|
:tab="t('views.account.settings.styleLayout')"
|
||||||
|
v-if="hasRoles(['admin'])"
|
||||||
>
|
>
|
||||||
<StyleLayout></StyleLayout>
|
<StyleLayout></StyleLayout>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</div>
|
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</a-card>
|
</a-card>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
|
|||||||
Reference in New Issue
Block a user