Browse Source

录音组件新增文件名配置

natasha 3 years ago
parent
commit
f5106db80e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/Adult/preview/Soundrecord.vue

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

@@ -110,7 +110,7 @@
 import Recorder from "js-audio-recorder"; //录音插件
 export default {
   components: {},
-  props: ["wavData", "type"],
+  props: ["wavData", "type", "fileName"],
   data() {
     return {
       recorder: new Recorder({
@@ -151,7 +151,7 @@ export default {
         }, 1000);
         this.$emit("handleParentPlay");
         let obj = {
-          name: "新录音" + _this.recordFile,
+          name: _this.fileName ? _this.fileName + _this.recordFile : "新录音" + _this.recordFile,
           id: _this.recordFile + Math.round(Math.random() * 10),
         };
         _this.recordList.push(obj);