mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2026-02-23 06:37:01 +00:00
1. 控件优化
2. 增加monaco-editor、echarts等
This commit is contained in:
@@ -3,24 +3,29 @@ import LeftMenu from '@/layout/LeftMenu.vue'
|
||||
import TopNav from '@/layout/TopNav.vue'
|
||||
import { useGlobalConfigStore } from '@/stores/GlobalConfigStore'
|
||||
import { useTabsViewStore } from '@/stores/TabsViewStore'
|
||||
import { useMenuConfigStore } from '@/stores/MenuConfigStore'
|
||||
import { GlobalLayoutMode } from '@/consts/GlobalConstants'
|
||||
import { computed } from 'vue'
|
||||
import GlobalSettings from '@/views/components/global/GlobalSettings.vue'
|
||||
import { useMenuConfigStore } from '@/stores/MenuConfigStore'
|
||||
import { useBreadcrumbConfigStore } from '@/stores/BreadcrumbConfigStore'
|
||||
import { APP_VERSION } from '@/config'
|
||||
import { useTabModeScrollSaver, getParentRootKey } from '@/route/RouteUtils'
|
||||
|
||||
const globalConfigStore = useGlobalConfigStore()
|
||||
const menuConfigStore = useMenuConfigStore()
|
||||
const tabsViewStore = useTabsViewStore()
|
||||
const breadcrumbConfigStore = useBreadcrumbConfigStore()
|
||||
const showLeftMenu = computed(() => {
|
||||
return globalConfigStore.layoutMode === GlobalLayoutMode.LEFT
|
||||
})
|
||||
menuConfigStore.loadBusinessMenus()
|
||||
useTabModeScrollSaver()
|
||||
useMenuConfigStore().loadBusinessMenus()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-container class="index-container">
|
||||
<el-aside
|
||||
v-if="showLeftMenu"
|
||||
class="index-aside"
|
||||
class="index-aside menu"
|
||||
width="auto"
|
||||
>
|
||||
<left-menu />
|
||||
@@ -33,39 +38,63 @@ menuConfigStore.loadBusinessMenus()
|
||||
v-if="globalConfigStore.layoutMode === GlobalLayoutMode.TOP && globalConfigStore.isShowBreadcrumb"
|
||||
class="tabs-header"
|
||||
>
|
||||
<common-breadcrumb />
|
||||
<common-breadcrumb
|
||||
:show-icon="tabsViewStore.isShowTabIcon"
|
||||
:label-config="breadcrumbConfigStore.breadcrumbConfig"
|
||||
/>
|
||||
</el-header>
|
||||
<el-header
|
||||
v-if="tabsViewStore.isTabMode"
|
||||
class="tabs-header"
|
||||
class="tabs-header tabMode"
|
||||
>
|
||||
<common-tabs-view />
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-main class="home-main">
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition
|
||||
name="slide-fade"
|
||||
:name="route.meta?.transition!==false?'slide-fade':''"
|
||||
mode="out-in"
|
||||
>
|
||||
<KeepAlive
|
||||
v-if="tabsViewStore.isTabMode&&tabsViewStore.isCachedTabMode"
|
||||
:include="tabsViewStore.cachedTabs"
|
||||
:max="10"
|
||||
:max="tabsViewStore.maxCacheCount"
|
||||
>
|
||||
<component
|
||||
:is="Component"
|
||||
:key="route.fullPath"
|
||||
:key="getParentRootKey(route)"
|
||||
/>
|
||||
</KeepAlive>
|
||||
<component
|
||||
:is="Component"
|
||||
v-else
|
||||
:key="route.fullPath"
|
||||
/>
|
||||
</transition>
|
||||
</router-view>
|
||||
<el-container class="text-center padding-10 flex-center">
|
||||
<span>
|
||||
<el-text>Copyright © 2024 Version: {{ APP_VERSION }}</el-text>
|
||||
<el-link
|
||||
href="https://github.com/fugary/simple-element-plus-template"
|
||||
type="primary"
|
||||
target="_blank"
|
||||
>
|
||||
https://github.com/fugary/simple-element-plus-template
|
||||
</el-link>
|
||||
</span>
|
||||
</el-container>
|
||||
<el-backtop
|
||||
v-common-tooltip="$t('common.label.backtop')"
|
||||
target=".home-main"
|
||||
:right="50"
|
||||
:bottom="50"
|
||||
/>
|
||||
</el-main>
|
||||
<global-settings />
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.tabs-header {
|
||||
margin-top: 5px;
|
||||
height: 40px
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user