de9d4d19 by simon

默认提交

1 parent f6af6369
1 <template> 1 <template>
2 <div id="app" :lang="lang"> 2 <div id="app" :lang="lang">
3 <v-header class="header"></v-header> 3 <v-header class="header"></v-header>
4 <main ref="container" class="main-container"> 4 <main ref="container" class="main-container" :class="{'main-container-min-height':!initCss}">
5 <router-view /> 5 <router-view />
6 </main> 6 </main>
7 <v-footer></v-footer> 7 <v-footer></v-footer>
...@@ -32,7 +32,8 @@ export default { ...@@ -32,7 +32,8 @@ export default {
32 }, 32 },
33 data() { 33 data() {
34 return { 34 return {
35 lang: "zh" 35 lang: "zh",
36 initCss: false
36 }; 37 };
37 }, 38 },
38 computed: { 39 computed: {
...@@ -76,6 +77,10 @@ export default { ...@@ -76,6 +77,10 @@ export default {
76 this.refreshUA(); 77 this.refreshUA();
77 // 78 //
78 this.refreshProfile(); 79 this.refreshProfile();
80
81 setTimeout(() => {
82 this.initCss = true;
83 }, 2000);
79 } 84 }
80 }; 85 };
81 </script> 86 </script>
...@@ -346,7 +351,7 @@ textarea { ...@@ -346,7 +351,7 @@ textarea {
346 .main-container { 351 .main-container {
347 position: relative; 352 position: relative;
348 margin: 0 auto; 353 margin: 0 auto;
349 width: 100%; 354 width: 100%;
350 355
351 &::after { 356 &::after {
352 display: table; 357 display: table;
...@@ -355,6 +360,10 @@ textarea { ...@@ -355,6 +360,10 @@ textarea {
355 } 360 }
356 } 361 }
357 362
363 .main-container-min-height {
364 min-height: 600px;
365 }
366
358 .content { 367 .content {
359 max-width: 1200px; 368 max-width: 1200px;
360 width: 100%; 369 width: 100%;
......
...@@ -80,10 +80,12 @@ export default { ...@@ -80,10 +80,12 @@ export default {
80 if (this.type == "lang") { 80 if (this.type == "lang") {
81 // 如果是语言设置,则设置语言 81 // 如果是语言设置,则设置语言
82 let lang = curData.value; 82 let lang = curData.value;
83 this.$i18n.locale = lang; 83 if (lang != localStorage.getItem('lang')) {
84 localStorage.setItem("lang", lang); 84 // this.$i18n.locale = lang;
85 this.sTitle = curData.name; 85 // this.sTitle = curData.name;
86 window.location.reload(); 86 localStorage.setItem("lang", lang);
87 window.location.reload();
88 }
87 } else { 89 } else {
88 // if (curData.value == "logout") { 90 // if (curData.value == "logout") {
89 // this.loginHandler(); 91 // this.loginHandler();
......