|
@@ -87,13 +87,16 @@ export default {
|
|
|
_this.audio.addEventListener("play", function () {
|
|
|
_this.changeStatus("active");
|
|
|
_this.isPlaying = true;
|
|
|
+ _this.$emit("getPlayStatus", true);
|
|
|
});
|
|
|
_this.audio.addEventListener("pause", function () {
|
|
|
_this.changeStatus("normal");
|
|
|
+ _this.$emit("getPlayStatus", false);
|
|
|
});
|
|
|
_this.audio.addEventListener("ended", function () {
|
|
|
_this.changeStatus("normal");
|
|
|
_this.isPlaying = false;
|
|
|
+ _this.$emit("getPlayStatus", false);
|
|
|
});
|
|
|
},
|
|
|
beforeCreate() {}, // 生命周期 - 创建之前
|