Browse Source

fiex:隐藏侧边栏待审核列表图标

Tang 3 years ago
parent
commit
0c0b8aca7f
2 changed files with 20 additions and 18 deletions
  1. 15 15
      src/layout/components/Sidebar/Item.vue
  2. 5 3
      src/layout/components/Sidebar/SidebarItem.vue

+ 15 - 15
src/layout/components/Sidebar/Item.vue

@@ -24,21 +24,21 @@ export default {
       vnodes.push(<svg-icon icon-class={icon} />);
     }
 
-    if (title === "学时待审核列表") {
-      if (indexnum >= 301) {
-        vnodes.push(
-          <i class="iconfont icon-safe_warn" style="color:red!important;"></i>
-        );
-      } else if (indexnum < 301 && indexnum >= 101) {
-        vnodes.push(
-          <i class="iconfont icon-safe_warn" style="color:yellow!important;"></i>
-        );
-      } else {
-        vnodes.push(
-          <i class="iconfont icon-safe_warn" style="color:#bfcbd9!important;"></i>
-        );
-      }
-    }
+    // if (title === "学时待审核列表") {
+    //   if (indexnum >= 301) {
+    //     vnodes.push(
+    //       <i class="iconfont icon-safe_warn" style="color:red!important;"></i>
+    //     );
+    //   } else if (indexnum < 301 && indexnum >= 101) {
+    //     vnodes.push(
+    //       <i class="iconfont icon-safe_warn" style="color:yellow!important;"></i>
+    //     );
+    //   } else {
+    //     vnodes.push(
+    //       <i class="iconfont icon-safe_warn" style="color:#bfcbd9!important;"></i>
+    //     );
+    //   }
+    // }
     if (title) {
       vnodes.push(<span slot="title">{title}</span>);
     }

+ 5 - 3
src/layout/components/Sidebar/SidebarItem.vue

@@ -51,7 +51,7 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
+// import { mapGetters } from "vuex";
 import path from "path";
 import { isExternal } from "@/utils/validate";
 import Item from "./Item";
@@ -79,9 +79,11 @@ export default {
   },
   data() {
     this.onlyOneChild = null;
-    return {};
+    return {
+      indexnum:0
+    };
   },
-  computed: { ...mapGetters(["indexnum"]) },
+  // computed: { ...mapGetters(["indexnum"]) },
   methods: {
     hasOneShowingChild(children = [], parent) {
       if (!children) {