瀏覽代碼

网页表头动态配置

彭宇 2 年之前
父節點
當前提交
f9424c341e
共有 1 個文件被更改,包括 5 次插入5 次删除
  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 = []