49 lines
974 B
Vue
49 lines
974 B
Vue
<template>
|
|||
|
|
<div :class="prefixCls">
|
||
|
|
<BasicLayout>
|
||
|
|
<transition>
|
||
|
|
<login v-if="!loggedIn" @enter="loggedIn = true" />
|
||
|
|
</transition>
|
||
|
|
<!-- <Setting />-->
|
||
|
|
<!-- <Customers />-->
|
||
|
|
<!-- <Users />-->
|
||
|
|
<Documents />
|
||
|
|
</BasicLayout>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup lang="ts">
|
||
|
|
import BasicLayout from '../../core/layouts/BasicLayout'
|
||
|
|
import Login from '../login'
|
||
|
|
import { getToken } from '@/utils'
|
||
|
|
import { usePrefix } from '@core/composable/usePrefix'
|
||
|
|
import Documents from '@/pages/dashboard/index.vue'
|
||
|
|
|
||
|
|
//css style
|
||
|
|
const { prefixCls } = usePrefix('main')
|
||
|
|
|
||
|
|
//login
|
||
|
|
const loggedIn = ref<Boolean>(true)
|
||
|
|
|
||
|
|
onBeforeMount(() => {
|
||
|
|
loggedIn.value = !!getToken()
|
||
|
|
console.log('sss', loggedIn.value)
|
||
|
|
})
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="less">
|
||
|
|
@prefix: ~'@{prefixCls}-main';
|
||
|
|
|
||
|
|
.@{prefix} {
|
||
|
|
.v-enter-active,
|
||
|
|
.v-leave-active {
|
||
|
|
transition: opacity 0.5s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
.v-enter-from,
|
||
|
|
.v-leave-to {
|
||
|
|
opacity: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|