From 23d4b49b327ce0995181f58bbed0f8408d0d88dc Mon Sep 17 00:00:00 2001
From: Suwings
Date: Mon, 8 Aug 2022 14:36:56 +0800
Subject: [PATCH] Feat: add v-iszh directive
---
src/app/directive/index.js | 0
src/app/index.js | 10 ++++++++++
src/app/views/Settings.vue | 22 +---------------------
3 files changed, 11 insertions(+), 21 deletions(-)
create mode 100644 src/app/directive/index.js
diff --git a/src/app/directive/index.js b/src/app/directive/index.js
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/index.js b/src/app/index.js
index 2aebc84..e547ca6 100644
--- a/src/app/index.js
+++ b/src/app/index.js
@@ -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");
+
diff --git a/src/app/views/Settings.vue b/src/app/views/Settings.vue
index 1bbe116..42fa637 100644
--- a/src/app/views/Settings.vue
+++ b/src/app/views/Settings.vue
@@ -334,28 +334,8 @@
{{ $t("settings.closedSourceInfo") }}
-
-
+
{{ $t("settings.sponsorList") }}