feat: 更新elementplus国际化默认中文显示
This commit is contained in:
parent
c41d8656bd
commit
57b5881b7a
@ -27,7 +27,7 @@ const breadcrumbList = ref([])
|
|||||||
// 更新并赋值路由表信息
|
// 更新并赋值路由表信息
|
||||||
const initBreadcrumbList = () => {
|
const initBreadcrumbList = () => {
|
||||||
breadcrumbList.value = route.matched
|
breadcrumbList.value = route.matched
|
||||||
console.log(route.matched)
|
// console.log(route.matched)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 路由跳转方法
|
// 路由跳转方法
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-container class="app-wrapper">
|
<el-container class="app-wrapper">
|
||||||
<el-aside :width="asideWidth" class="sidebar-container">
|
<el-aside :width="asideWidth" class="sidebar-container">
|
||||||
<Menu />
|
<menuIndex />
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-container
|
<el-container
|
||||||
class="container"
|
class="container"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Menu from './menu/menuIndex'
|
import menuIndex from './menu/menuIndex'
|
||||||
import Headers from './headers/hearderIndex.vue'
|
import Headers from './headers/hearderIndex.vue'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useStore } from 'vuex'
|
import { useStore } from 'vuex'
|
||||||
@ -29,7 +29,7 @@ const asideWidth = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-container {
|
.app-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -37,12 +37,11 @@ const asideWidth = computed(() => {
|
|||||||
.container {
|
.container {
|
||||||
width: calc(100% - $sideBarWidth);
|
width: calc(100% - $sideBarWidth);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
transition: all 0.28s;
|
transition: all 0.1s;
|
||||||
&.hidderContainer {
|
&.hidderContainer {
|
||||||
width: calc(100% - $hideSideBarWidth);
|
width: calc(100% - $hideSideBarWidth);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-menu
|
<el-menu
|
||||||
active-text-color="#ffd04b"
|
active-text-color="#ffd04b"
|
||||||
background-color="variables.menuBg"
|
background-color="$menuBg"
|
||||||
class="el-menu-vertical-demo"
|
class="el-menu-vertical-demo"
|
||||||
text-color="#fff"
|
text-color="#fff"
|
||||||
router
|
router
|
||||||
@ -10,8 +10,8 @@
|
|||||||
:collapse="!$store.getters.siderType"
|
:collapse="!$store.getters.siderType"
|
||||||
>
|
>
|
||||||
<el-sub-menu
|
<el-sub-menu
|
||||||
:index="item.id"
|
|
||||||
v-for="(item, index) in menusList"
|
v-for="(item, index) in menusList"
|
||||||
|
:index="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
@ -21,9 +21,9 @@
|
|||||||
<span>{{ item.authName }}</span>
|
<span>{{ item.authName }}</span>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item
|
<el-menu-item
|
||||||
:index="'/' + it.path"
|
|
||||||
v-for="it in item.children"
|
v-for="it in item.children"
|
||||||
:key="it.id"
|
:key="it.id"
|
||||||
|
:index="'/' + it.path"
|
||||||
@click="savePath(it.path)"
|
@click="savePath(it.path)"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
@ -51,6 +51,7 @@ const menusList = ref([])
|
|||||||
// 发起菜单数据获取请求并调用
|
// 发起菜单数据获取请求并调用
|
||||||
const initMenusList = async () => {
|
const initMenusList = async () => {
|
||||||
menusList.value = await menuList()
|
menusList.value = await menuList()
|
||||||
|
console.log('测试', menusList.value)
|
||||||
}
|
}
|
||||||
initMenusList()
|
initMenusList()
|
||||||
|
|
||||||
|
@ -11,8 +11,13 @@ import i18n from './i18n/i18nIndex'
|
|||||||
import * as Cesium from '../node_modules/cesium/Source/Cesium'
|
import * as Cesium from '../node_modules/cesium/Source/Cesium'
|
||||||
import '../node_modules/cesium/Source/Widgets/widgets.css'
|
import '../node_modules/cesium/Source/Widgets/widgets.css'
|
||||||
import filters from '@/utils/filters'
|
import filters from '@/utils/filters'
|
||||||
|
import ElementPlus from 'element-plus'
|
||||||
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
app.use(ElementPlus, {
|
||||||
|
locale: zhCn
|
||||||
|
})
|
||||||
SvgIcon(app)
|
SvgIcon(app)
|
||||||
app.use(store).use(router).use(i18n).mount('#app')
|
app.use(store).use(router).use(i18n).mount('#app')
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ $menuHover: #263445;
|
|||||||
$subMenuBg: #1f2d3d;
|
$subMenuBg: #1f2d3d;
|
||||||
$subMenuHover: #001528;
|
$subMenuHover: #001528;
|
||||||
|
|
||||||
$sideBarWidth: 210px;
|
$sideBarWidth: 200px;
|
||||||
$hideSideBarWidth: 67px;
|
$hideSideBarWidth: 67px;
|
||||||
$sideBarDuration: 0.28s;
|
$sideBarDuration: 0.28s;
|
||||||
|
|
||||||
|
@ -49,13 +49,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:currentPage="queryFrom.pagenum"
|
v-model:current-page="queryFrom.pagenum"
|
||||||
v-model:page-size="queryFrom.pagesize"
|
v-model:page-size="queryFrom.pagesize"
|
||||||
:page-sizes="[2, 5, 10, 15]"
|
:page-sizes="[2, 5, 10, 15]"
|
||||||
:small="small"
|
:small="small"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:background="background"
|
:background="background"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="->, total, sizes, prev, pager, next, jumper"
|
||||||
:total="total"
|
:total="total"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@ -174,6 +174,5 @@ const delUser = (row) => {
|
|||||||
.footer {
|
.footer {
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user