panhui 7 years ago
parent
commit
ebfeef2eeb
1 changed files with 4 additions and 7 deletions
  1. 4 7
      src/renderer/pages/Home.vue

+ 4 - 7
src/renderer/pages/Home.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="mian" ref="main" v-loading='loading'>
         <div class="folderList" @click="isChoose=0,orderShow=false" ref='folderList'>
-            <floder v-for="(item,index) in list" :key="index" :info='item' @dbClick='goDetailPage(item.id)' @click="showDetail(item.id)" :isChoose="isChoose==item.id" ></floder>
+            <floder v-for="(item,index) in list" :key="index" :info='item' @dbClick='goDetailPage(item.id)' @click="showDetail(item.id)" :isChoose="isChoose==item.id"></floder>
         </div>
         <order-content :chooseId='isChoose' :orderShow='orderShow' :orderHeight='orderHeight' :orderWidth='orderWidth' @updateHeight='updateHeight'></order-content>
     </div>
@@ -54,11 +54,7 @@ export default {
         }
     },
     mounted() {
-
-        setTimeout(() => {
-            this.orderWidth = this.$refs.main.offsetWidth;
-            // this.orderHeight = this.$refs.main.offsetHeight;
-        }, 1000)
+        this.orderWidth = this.allWidth-200;
 
 
         this.refresh()
@@ -86,12 +82,13 @@ export default {
             }
         },
         showDetail(i) {
+            this.orderWidth = this.$refs.main.offsetWidth;
             this.orderHeight = this.$refs.main.offsetHeight - 300;
             this.isChoose = i;
             this.orderShow = true;
         },
         goDetailPage(id) {
-          this.$router.push('/orderDetail?clientOrderId='+id)
+            this.$router.push('/orderDetail?clientOrderId=' + id)
         },
         getList() {
             if (this.currentPage == 1) {