Explorar o código

分类列表,只有一个分类权限的时候重置默认选项卡

cxmo hai 1 ano
pai
achega
d127c5fce2
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/views/classify_manage/indexList.vue

+ 8 - 0
src/views/classify_manage/indexList.vue

@@ -22,6 +22,14 @@ export default {
         typeChange(e){
             this.type=e
         }
+    },
+    mounted(){
+        const {classifyBtn,enClassifyBtn,checkPermissionBtn} = this.permissionBtn
+        if(checkPermissionBtn(classifyBtn.classifyList_cnClassify)){
+            this.type = '1'
+        }else if(checkPermissionBtn(enClassifyBtn.classifyList_enClassify)){
+            this.type = '2'
+        }
     }
 }
 </script>