mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Chore: add theme (#15361)
This commit is contained in:
@@ -303,7 +303,7 @@
|
||||
</li>
|
||||
<li
|
||||
class="nav-item"
|
||||
v-if="showThemeConfigurator"
|
||||
v-if="$isEle"
|
||||
>
|
||||
<router-link
|
||||
active-class="active"
|
||||
@@ -373,7 +373,7 @@
|
||||
|
||||
<!--theme picker-->
|
||||
<li class="nav-item nav-theme-switch" v-show="isComponentPage">
|
||||
<theme-picker v-if="!showThemeConfigurator"></theme-picker>
|
||||
<theme-picker v-if="!$isEle"></theme-picker>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -405,8 +405,7 @@
|
||||
'en-US': 'English',
|
||||
'es': 'Español',
|
||||
'fr-FR': 'Français'
|
||||
},
|
||||
showThemeConfigurator: false
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -432,18 +431,14 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const host = location.hostname;
|
||||
this.showThemeConfigurator = host.match('localhost') || host.match('elenet');
|
||||
if (!this.showThemeConfigurator) {
|
||||
getVars()
|
||||
.then(() => {
|
||||
this.showThemeConfigurator = true;
|
||||
ga('send', 'event', 'DocView', 'Inner');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
getVars()
|
||||
.then(() => {
|
||||
this.$isEle = true;
|
||||
ga('send', 'event', 'DocView', 'Inner');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
switchVersion(version) {
|
||||
|
||||
Reference in New Issue
Block a user