cloud-web-corejs 1.0.54-dev.441 → 1.0.54-dev.443
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,6 +14,9 @@ function getUrlParams(url) {
|
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'Login',
|
|
17
|
+
props:{
|
|
18
|
+
lang: [String,Function]
|
|
19
|
+
},
|
|
17
20
|
components: {},
|
|
18
21
|
data() {
|
|
19
22
|
return {
|
|
@@ -99,10 +102,17 @@ export default {
|
|
|
99
102
|
},
|
|
100
103
|
methods: {
|
|
101
104
|
initLang(){
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this
|
|
105
|
-
|
|
105
|
+
let lang = this.$route.query.lang || this.lang;
|
|
106
|
+
if(!lang && !!this.lang){
|
|
107
|
+
if(typeof this.lang === "function"){
|
|
108
|
+
lang = this.lang();
|
|
109
|
+
}else{
|
|
110
|
+
lang = this.lang;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if(lang){
|
|
114
|
+
this.$i18n.locale = lang;
|
|
115
|
+
localStorage.setItem("i18n-lang", lang);
|
|
106
116
|
}
|
|
107
117
|
},
|
|
108
118
|
init() {
|