perf: 登录才展示RightSide
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<NavbarMenu />
|
<NavbarMenu />
|
||||||
</div>
|
</div>
|
||||||
<RightSide />
|
<RightSide :isAgentRoute="isAgentRoute" v-if="userStore.isLogin"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,8 +16,16 @@
|
|||||||
import NavbarMenu from './components/navbar-menu';
|
import NavbarMenu from './components/navbar-menu';
|
||||||
import RightSide from './components/right-side';
|
import RightSide from './components/right-side';
|
||||||
|
|
||||||
|
import { useUserStore } from '@/stores';
|
||||||
import { handleUserHome } from '@/utils/user.ts';
|
import { handleUserHome } from '@/utils/user.ts';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
|
const isAgentRoute = computed(() => {
|
||||||
|
return route.meta?.isAgentRoute;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.navbar-wrap {
|
.navbar-wrap {
|
||||||
|
|||||||
Reference in New Issue
Block a user