管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-08 6c33f9c50792c03e55549f82c17405552ecff540
src/components/navMenu.vue
@@ -60,13 +60,13 @@
              class="elLink"
            >{{$t("common.language")}}</el-link>
          </div>
            <!-- <div class="TextLanguage">
          <div class="TextLanguage">
            <el-link
              @click="themeChange"
              :underline="false"
              class="elLink"
            > 主题切换</el-link>
          </div>    -->
          </div>
        </div>
      </div>
@@ -122,12 +122,14 @@
  },
  created() { },
  mounted() {
    this.$store.state.themeflag = false;
    $("#app").removeClass("Black_theme");
    this.getMenuTree();
  },
  computed: {},
  methods: {
    themeChange() {
          this.$store.state.themeflag = !this.$store.state.themeflag;
      this.$store.state.themeflag = !this.$store.state.themeflag;
      if (this.$store.state.themeflag == true) {
        $("#app").addClass("Black_theme");
@@ -256,7 +258,7 @@
        res[i].show = false; //控制显隐
        if (res[i].perms == null) {
          const result = await selectMenuRecursive({ id: res[i].id });
          if (result.code == 200) {
            res[i].children = result.result.filter((value) => {
              return value.pid == res[i].id;
@@ -325,6 +327,7 @@
        //语言换成zh
        this.lang = 'zh';
        this.language = true;
        this.$store.state.language = true;
        //菜单换为zh
        this.$store.commit('changeLang', 'zh');
        //i18换成zh
@@ -334,6 +337,7 @@
      else {
        this.lang = 'en';
        this.language = false;
        this.$store.state.language = false;
        this.$i18n.locale = this.lang;
        this.$store.commit('changeLang', 'en'); //传递点击的节点
      }