28 lines
781 B
Vue
28 lines
781 B
Vue
<template>
|
|
<!-- {{ roleName }} -->
|
|
<component :is="com[roleName]" />
|
|
</template>
|
|
|
|
<script setup lang="ts" name="dashboard">
|
|
import { ref, onMounted, defineAsyncComponent, computed, onUnmounted } from 'vue';
|
|
import { Session } from '/@/utils/storage';
|
|
import { NextLoading } from '/@/utils/loading';
|
|
|
|
// 引入组件
|
|
const com: any = {
|
|
common: defineAsyncComponent(() => import('/@/views/pages/index/common/index.vue')),
|
|
admin: defineAsyncComponent(() => import('/@/views/pages/index/admin/index.vue')),
|
|
};
|
|
|
|
// 获取账号类型
|
|
const roleName = computed(() => {
|
|
return 'common'//Session.get('roleName') === 'common' || Session.get('roleName') === 'subCommon' ? 'common' : 'admin';
|
|
});
|
|
|
|
onMounted(() => {
|
|
NextLoading.done();
|
|
});
|
|
</script>
|
|
|
|
<style scoped lang="scss"></style>
|