zhangli před 1 rokem
rodič
revize
e663cb91b8

+ 6 - 7
src/views/modules/knowledge/components/classMenu.vue

@@ -1,17 +1,16 @@
 <template>
   <div class="treeBox">
-    <tree-comp :treeData="options" @handleClick="handleClick"></tree-comp>
+    <treeComp :treeData="options" @handleClick="handleClick"></treeComp>
   </div>
 </template>
 <script>
 export default {
   props: {
     options: {
-      type: Object,
-      default: []
+      default: {}
     },
     categoryValue: {
-      type: Object,
+      type: Array,
       default: []
     },
   },
@@ -22,8 +21,8 @@ export default {
       checkId:null
     }
   },
-  components:{
-    
+  created(){
+    this.init()
   },
   mounted(){
     this.checkArr=this.categoryValue
@@ -31,7 +30,7 @@ export default {
       this.checkId=this.categoryValue[(this.categoryValue.length-1)]
     }
     this.checkArr.push('000')
-    this.init()
+    //this.init()
   },
   methods:{
     init(){

+ 2 - 2
src/views/modules/knowledge/warehouse/contentData.vue

@@ -219,8 +219,8 @@ export default {
 
     // 计算
     setTimeout(() => {
-      let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
-      this.widthVar = innerWidth - offsetWidth - 40
+      //let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
+      //this.widthVar = innerWidth - offsetWidth - 40
     }, 1000);
     document.onclick=function(element){
         if(element.target.className.indexOf('ant-cascader-menu-item')>-1){