diff --git a/index.ejs b/index.ejs index 35feea7d..2053150a 100644 --- a/index.ejs +++ b/index.ejs @@ -1,12 +1,12 @@ - + 倾城之链 | NICE LINKS - + diff --git a/src/mixins/globalMixin.js b/src/mixins/globalMixin.js index 78e0cd77..d64bb487 100644 --- a/src/mixins/globalMixin.js +++ b/src/mixins/globalMixin.js @@ -40,9 +40,12 @@ Vue.mixin({ }, $switchLang () { - let currentLang = Vue.config.lang === 'zh' ? 'en' : 'zh' + const currentLang = Vue.config.lang === 'zh' ? 'en' : 'zh' Vue.config.lang = currentLang Cookies.set('lang', currentLang) + + const htmlLang = currentLang === 'zh' ? 'zh-CN' : 'en' + document.getElementsByTagName('html')[0].lang = htmlLang }, $switchRouteByExplore (name = '') {