| @@ -137,16 +137,3 @@ | |||||
| </div> | </div> | ||||
| <script type="text/javascript"> | |||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("menutext_2").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| </script> | |||||
| @@ -217,13 +217,13 @@ | |||||
| </div> | </div> | ||||
| {{template "base/footer" .}} | {{template "base/footer" .}} | ||||
| <script type="text/javascript"> | |||||
| import Vue from 'vue'; | |||||
| <script type="mode"> | |||||
| import Vue from 'vue' | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | import enLocale from 'element-ui/lib/locale/lang/en' | ||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | ||||
| import locale from 'element-ui/lib/locale' | import locale from 'element-ui/lib/locale' | ||||
| var text_langName = document.getElementById("menutext_2").innerText | |||||
| let text_langName = document.getElementById("menutext_2").innerText | |||||
| console.log("fjdhfdjhfjdhfdjhfdj:",text_langName) | console.log("fjdhfdjhfjdhfdjhfdj:",text_langName) | ||||
| if (text_langName == '简体中文'){ | if (text_langName == '简体中文'){ | ||||
| locale.use(zhLocale) | locale.use(zhLocale) | ||||
| @@ -101,8 +101,8 @@ | |||||
| let index = this.href_.indexOf("?") | let index = this.href_.indexOf("?") | ||||
| this.url_infor = this.href_.substring(index+1,this.href_.length) | this.url_infor = this.href_.substring(index+1,this.href_.length) | ||||
| this.getContributorsList() | this.getContributorsList() | ||||
| this.text_langName='' | |||||
| this.getLang() | |||||
| // this.text_langName='' | |||||
| // this.getLang() | |||||
| }, | }, | ||||
| updated(){ | updated(){ | ||||
| @@ -111,7 +111,7 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| mounted(){ | mounted(){ | ||||
| this.getLang() | |||||
| // this.getLang() | |||||
| } | } | ||||
| }; | }; | ||||
| </script> | </script> | ||||
| @@ -9,7 +9,7 @@ | |||||
| </div> | </div> | ||||
| <div class="ui container" id="header"> | <div class="ui container" id="header"> | ||||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | <el-tabs v-model="activeName" @tab-click="handleClick"> | ||||
| <el-tab-pane label="$t('message.cloud_brain_mirror')公共镜像(云脑1)" name="first" v-loading="loading"> | |||||
| <el-tab-pane label="$t(message.cloud_brain_mirror) 云脑镜像" name="first" v-loading="loading"> | |||||
| <div class="ui sixteen wide column"> | <div class="ui sixteen wide column"> | ||||
| <div class="ui two column stackable grid"> | <div class="ui two column stackable grid"> | ||||
| <div class="column"> | <div class="column"> | ||||
| @@ -375,11 +375,11 @@ export default { | |||||
| this.text_langName = document.getElementById("menutext_1").innerText | this.text_langName = document.getElementById("menutext_1").innerText | ||||
| if (this.text_langName == '简体中文'){ | if (this.text_langName == '简体中文'){ | ||||
| this.$i18n.locale = 'zh' | this.$i18n.locale = 'zh' | ||||
| locale.use(zhLocale) | |||||
| // locale.use(zhLocale) | |||||
| } | } | ||||
| else if (this.text_langName == 'English'){ | else if (this.text_langName == 'English'){ | ||||
| this.$i18n.locale = 'en' | this.$i18n.locale = 'en' | ||||
| locale.use(enLocale) | |||||
| // locale.use(enLocale) | |||||
| } | } | ||||
| } | } | ||||
| @@ -77,6 +77,21 @@ Vue.use(Element, { | |||||
| i18n: (key, value) => i18n.t(key, value) | i18n: (key, value) => i18n.t(key, value) | ||||
| }) | }) | ||||
| function initGetlang(){ | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| i18n.locale = 'zh' | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| i18n.locale = 'en' | |||||
| locale.use(enLocale) | |||||
| } | |||||
| } | |||||
| initGetlang() | |||||
| Object.defineProperty(Vue.prototype, '$echarts', { | Object.defineProperty(Vue.prototype, '$echarts', { | ||||
| value: echarts | value: echarts | ||||
| }) | }) | ||||