App.vue
2.2 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<template>
<div id="app" style="width:100%;height:100%">
<router-view v-if="isRouterAlive"></router-view>
</div>
</template>
<script>
export default {
data() {
return {
isRouterAlive: true
}
},
provide() {
return {
reload: this.reload
}
},
methods: {
reload() {
this.isRouterAlive = false;
this.$nextTick(() => {
this.isRouterAlive = true;
})
}
},
created() {
// if (!window.localStorage.getItem('selectTab')) {
// window.localStorage.setItem('selectTab', 'home')
// }
let webV = localStorage.getItem('webVersion');
if (webV && webV !== 'undefined') {
if (window._vionConfig.webVersion != webV) {
localStorage.setItem('webVersion', window._vionConfig.webVersion);
this.removeStorge();
this.$router.push('/');
} else {
}
} else {
if (window._vionConfig.webVersion) {
localStorage.setItem('webVersion', window._vionConfig.webVersion);
}
}
},
mounted() {
let langObj = ['zh_CN', 'en_US', 'zh_TW']
//if (this.$Project === 'store') {
let _lang = localStorage.getItem('lang') || window.navigator.language;
if (langObj.includes(_lang)) {
_lang = _lang == 'mall_CN' ? 'zh_CN' : _lang;
} else {
if(_lang=='zh-TW'){
_lang='zh_TW'
}else if(_lang=='zh-CN'){
_lang='zh_CN'
}else{
_lang='en_US'
}
}
localStorage.setItem('lang', _lang)
// } else {
// let _lang = 'mall_CN';
// localStorage.setItem('lang', _lang)
// }
}
}
</script>
<style>
::-webkit-scrollbar-thumb{
background-color:#ccc;
height:50px;
outline-offset:-2px;
outline:2px solid #fff;
-webkit-border-radius:4px;
border: 2px solid #fff;
}
/*---鼠标点击滚动条显示样式--*/
::-webkit-scrollbar-thumb:hover{
background-color:#ccc;
height:50px;
-webkit-border-radius:4px;
}
/*---滚动条大小--*/
::-webkit-scrollbar{
width:10px !important;
height:10px !important;
}
/*---滚动框背景样式--*/
::-webkit-scrollbar-track-piece{
background-color:#fff;
-webkit-border-radius:0;
}
</style>