1404/11/04- first
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user