浏览代码

录音 -1

natasha 1 年之前
父节点
当前提交
888ff2aec0
共有 1 个文件被更改,包括 2 次插入1 次删除
  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实例)