feat:优化页面代码及版本升级报错处理
parent
514f21334a
commit
134d10fa75
|
|
@ -10,7 +10,6 @@ declare interface ImportMetaEnv {
|
||||||
readonly VITE_BASE_API: string
|
readonly VITE_BASE_API: string
|
||||||
readonly VITE_EDITOR_URL: string
|
readonly VITE_EDITOR_URL: string
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface ImportMeta {
|
declare interface ImportMeta {
|
||||||
readonly env: ImpoertMetaEnv
|
readonly env: ImpoertMetaEnv
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineProps({
|
defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -14,14 +13,14 @@
|
||||||
<el-icon v-if="data.icon" style="vertical-align: middle;">
|
<el-icon v-if="data.icon" style="vertical-align: middle;">
|
||||||
<component :is="data.icon"></component>
|
<component :is="data.icon"></component>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span style="vertical-align: middle;">{{data.meta.title}}</span>
|
<span style="vertical-align: middle;">{{ data.meta.title }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="item in data.children" :key="item.name">
|
<template v-for="item in data.children" :key="item.name">
|
||||||
<el-menu-item v-if="!item.children" :index="item.path">
|
<el-menu-item v-if="!item.children" :index="item.path">
|
||||||
<el-icon v-if="item.icon" style="vertical-align: middle;">
|
<el-icon v-if="item.icon" style="vertical-align: middle;">
|
||||||
<component :is="item.icon"></component>
|
<component :is="item.icon"></component>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span style="vertical-align: middle;">{{item.meta.title}}</span>
|
<span style="vertical-align: middle;">{{ item.meta.title }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<TbSubmenu v-else :data='item'></TbSubmenu>
|
<TbSubmenu v-else :data='item'></TbSubmenu>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@ import globalProperties from './utils/globalProperties'
|
||||||
import hasPermission from './utils/hasPermission'
|
import hasPermission from './utils/hasPermission'
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
app.use(globalProperties)
|
app.use(router).use(globalProperties)
|
||||||
app.use(router)
|
|
||||||
app.use(ElementPlus,{
|
app.use(ElementPlus,{
|
||||||
locale: zhCn,
|
locale: zhCn,
|
||||||
size: 'default',
|
size: 'default',
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
export default [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
redirect: 'login',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/login',
|
|
||||||
name: 'login',
|
|
||||||
meta: {title: "登录"},
|
|
||||||
component: () => import("@/views/common/Login.vue"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/404',
|
|
||||||
name: '404',
|
|
||||||
meta: {title: "404"},
|
|
||||||
component: () => import('@/views/common/404.vue')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/500',
|
|
||||||
name: '500',
|
|
||||||
meta: {title: "500"},
|
|
||||||
component: () => import('@/views/common/500.vue')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/index',
|
|
||||||
name: 'index',
|
|
||||||
meta: { title: "首页" },
|
|
||||||
redirect: '/index/home',
|
|
||||||
component: () => import("@/components/layout/Index.vue"),
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: 'home',
|
|
||||||
name: 'Home',
|
|
||||||
meta: { title: "首页" },
|
|
||||||
component: () => import('@/views/home/Home.vue')
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -8,4 +8,5 @@ export default {
|
||||||
info: {},
|
info: {},
|
||||||
authorities: [],
|
authorities: [],
|
||||||
},
|
},
|
||||||
|
visitedViews:[]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue