add
yirongjin
2025-07-24 b9c933a1a9c9de300ed8b10d07d482216c387323
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script>
import { ElConfigProvider } from 'element-plus'
import e_zhCn from 'element-plus/lib/locale/lang/zh-cn'
import e_en from 'element-plus/lib/locale/lang/en'
 
export default {
    components:{ElConfigProvider},
    data(){
        return {
            eLangs:{
                'zh_CN':e_zhCn,
                'en':e_en
            }
        }
    },
    computed:{
        locale(){
            let nowLang = this.$store.getters['system/getCurrentLang'];
            return this.eLangs[nowLang];
        }
    },
    methods:{
        jsJump(path){
            let curPath = this.$route.path;
            if (path!==curPath){
                this.$router.push(path)
            }
        }
    }
}
</script>
 
<template>
    <el-config-provider :locale="locale">
        <router-view></router-view>
    </el-config-provider>
</template>
 
<style lang="scss">
 
 
</style>