Feat: add v-iszh directive

This commit is contained in:
Suwings 2022-08-08 14:36:56 +08:00
parent f6166e6021
commit 23d4b49b32
3 changed files with 11 additions and 21 deletions

View File

View File

@ -26,6 +26,15 @@ import store from "./store";
app.use(store);
app.use(i18n)
app.directive("iszh", {
// eslint-disable-next-line no-unused-vars
mounted(el, binding, vnode) {
console.log("ISZH:", i18n)
const language = i18n.global.locale
if (language != "zh_cn") el.style.display = 'none'
}
})
// Vue-Router
import router from "./router";
app.use(router);
@ -38,3 +47,4 @@ import ItemGroup from "../components/ItemGroup";
app.component("ItemGroup", ItemGroup);
app.mount("#app");

View File

@ -334,28 +334,8 @@
{{ $t("settings.closedSourceInfo") }}
</p>
</div>
<div>
<ItemGroup>
<a
href="https://mcsmanager.com/#app-download"
target="_blank"
rel="noopener noreferrer"
style="display: inline-block"
>
<el-button type="" size="medium">{{ $t("settings.learnMore") }}</el-button>
</a>
<a
href="https://mcsmanager.com/agreement.html"
target="_blank"
rel="noopener noreferrer"
style="display: inline-block"
>
<el-button type="" size="medium">{{ $t("settings.userAgreement") }}</el-button>
</a>
</ItemGroup>
</div>
<div class="contributors" v-if="sponsorList">
<div class="contributors" v-if="sponsorList" v-iszh>
<div class="sub-title">
<p class="sub-title-title">{{ $t("settings.sponsorList") }}</p>
<p class="sub-title-info">