natasha 1 år sedan
förälder
incheckning
888ff2aec0
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      src/components/Adult/preview/Soundrecord.vue

+ 2 - 1
src/components/Adult/preview/Soundrecord.vue

@@ -185,7 +185,8 @@ export default {
     answerRecordList(newVal) {
       let _this = this;
       _this.recordList = newVal;
-      _this.selectIndex = _this.recordList.length - 1;
+      _this.selectIndex =
+        _this.recordList.length > 0 ? _this.recordList.length - 1 : null;
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)