| | |
| | | this.eventAudio.addEventListener("ended", () => { |
| | | this.togglePlay = true; |
| | | }); |
| | | if (this.editData.type) { |
| | | this.initEditData(); |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | voiceId: this.editData.rule.voiceId, |
| | | index: this.editData.index, |
| | | }; |
| | | this.soundList.forEach((item) => { |
| | | if (item.id == this.editData.rule.voiceId) { |
| | | this.ruleForm.voiceId = item.id; |
| | | this.ruleForm.voice = item; |
| | | } |
| | | }); |
| | | }, |
| | | getSounds() { |
| | | let _this = this; |
| | |
| | | .then((res) => { |
| | | if (res.success) { |
| | | _this.soundList = [{ id: "", name: "空", path: "" }].concat( |
| | | res.data |
| | | res.data.voices |
| | | ); |
| | | if (_this.editData.type) { |
| | | _this.initEditData(); |
| | | } |
| | | } |
| | | }) |
| | | .catch((e) => console.log(e)); |