Sfoglia il codice sorgente

网页表头动态配置

彭宇 2 anni fa
parent
commit
f9424c341e
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      src/views/afforestation.vue

+ 5 - 5
src/views/afforestation.vue

@@ -15,7 +15,7 @@
               </el-date-picker>
             </div>
             <div class="i-list-con h-19">
-              <div class="d-l-con" :class="{on:listCurrentIndex1 == item.id}" v-for="(item,index) in afforestationList"
+              <div class="d-l-con" v-if="afforestationList!=null&&afforestationList.length>0" :class="{on:listCurrentIndex1 == item.id}" v-for="(item,index) in afforestationList"
                    @click="getAfforestationArea(item.id)">
                 <div class="d-l-l-text">
                   <i class="i-small"></i>
@@ -91,8 +91,8 @@ export default {
   },
   data() {
     return {
-      listCurrentIndex1: '',
-      listCurrentIndex2: '',
+      listCurrentIndex1: '1',
+      listCurrentIndex2: '2',
       pickYear: new Date(), //选择年份
       afforestationList: [],
       AfforestationAreaList: [],
@@ -172,8 +172,8 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
 
     getInit() {
-      this.listCurrentIndex1 = ''
-      this.listCurrentIndex2 = ''
+      this.listCurrentIndex1 = '1'
+      this.listCurrentIndex2 = '2'
       let that = this
       this.afforestationList = []
       this.AfforestationAreaList = []