|
@@ -144,12 +144,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
audioEnded(name) {
|
|
|
- this.audioInPlay = new Set(this.audioInPlay).delete(name);
|
|
|
+ const s = new Set([...this.audioInPlay]);
|
|
|
+ s.delete(name);
|
|
|
+ this.audioInPlay = s;
|
|
|
},
|
|
|
played(index, $event) {
|
|
|
const name = $event.target.attributes.name.value;
|
|
|
if (!this.examQuestion.limitedPlayTimes) {
|
|
|
- this.audioInPlay = new Set(this.audioInPlay).add(name);
|
|
|
+ const s = new Set([...this.audioInPlay]);
|
|
|
+ s.add(name);
|
|
|
+ this.audioInPlay = s;
|
|
|
// 如果没有设置音频播放次数
|
|
|
return false;
|
|
|
}
|
|
@@ -164,7 +168,9 @@ export default {
|
|
|
$event.target.pause();
|
|
|
return;
|
|
|
}
|
|
|
- this.audioInPlay = new Set(this.audioInPlay).add(name);
|
|
|
+ const s = new Set([...this.audioInPlay]);
|
|
|
+ s.add(name);
|
|
|
+ this.audioInPlay = s;
|
|
|
|
|
|
// var audio = new Audio($event.target.src);
|
|
|
// audio.play();
|