wolyshaw 3 years ago
parent
commit
506ea038bd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/views/resetTeaming/components/training-photos/index.vue

+ 2 - 1
src/views/resetTeaming/components/training-photos/index.vue

@@ -6,6 +6,7 @@
       <el-button type="primary" v-if="sorting" @click="setSort()">确定</el-button>
       <el-button type="primary" v-if="sorting" @click="stopSort()">取消</el-button>
     </div>
+    <empty v-if="activeNames && activeNames.length == 0"/>
     <el-collapse style="margin-top: 20px;" v-model="activeNames">
       <el-collapse-item v-for="ykey in yearsList" :title="ykey + '年 相册'" :key="ykey" :name="ykey">
         <empty v-if="years[ykey].length == 0"/>
@@ -207,7 +208,7 @@ export default {
         }
         this.years = sortyears
         this.yearsList = Object.keys(sortyears).sort((a, b) => b - a)
-        this.activeNames = this.yearsList[0]
+        this.activeNames = this.yearsList[0] || []
       } catch (error) {}
     },
     async removeItem(item) {