Эх сурвалжийг харах

处理选择人员时,机构树变形问题

jiawuxian 1 жил өмнө
parent
commit
1a133b5a56

+ 8 - 1
src/components/orgTree/index.vue

@@ -96,6 +96,10 @@ export default {
     defaultCheckSub:{
       type:Boolean,
       default:true
+    },
+    autoHeight:{
+      type:Boolean,
+      default:true,
     }
   },
   watch: {
@@ -118,13 +122,16 @@ export default {
     ...mapGetters(["orgTree"]),
   },
   mounted() {
-    this.getHeight();
+    if(autoHeight){
+      this.getHeight();
+    }    
   },
   methods: {
     getHeight(){
       let orgTree = document.querySelector('.org-tree');
       const resizeObserver = new ResizeObserver(entries => {
         for (let entry of entries) {
+          debugger
           orgTree.style.height = entry.contentRect.height + 'px';
         }
       });

+ 1 - 0
src/components/userSelector/index.vue

@@ -19,6 +19,7 @@
             @click="clickTreeNode"
             :customRequest="customTreeRequest"
             :defuaultCheckSub="search.checkSub"
+            :autoHeight="false"
           ></org-tree>
         </el-col>
         <el-col :span="18" :xs="24">