refactor: ♻️ 使用布局枚举替换字面量
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div :class="{ 'has-logo': sidebarLogo }">
|
||||
<!--混合布局-->
|
||||
<div class="flex w-full" v-if="layout == 'mix'">
|
||||
<div class="flex w-full" v-if="layout == LayoutEnum.MIX">
|
||||
<SidebarLogo v-if="sidebarLogo" :collapse="!appStore.sidebar.opened" />
|
||||
<SidebarMixTopMenu class="flex-1" />
|
||||
<NavbarRight />
|
||||
@@ -12,13 +12,14 @@
|
||||
<el-scrollbar>
|
||||
<SidebarMenu :menu-list="permissionStore.routes" base-path="" />
|
||||
</el-scrollbar>
|
||||
<NavbarRight v-if="layout === 'top'" />
|
||||
<NavbarRight v-if="layout === LayoutEnum.TOP" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useSettingsStore, usePermissionStore, useAppStore } from "@/store";
|
||||
import { LayoutEnum } from "@/enums/LayoutEnum";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
Reference in New Issue
Block a user