From 632c3c919b77461e9111d40b5a38a74da75683de Mon Sep 17 00:00:00 2001 From: zhouliujun <1096432931@qq.com> Date: Sat, 10 Oct 2020 15:16:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=B8=AA=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=99=A8=E5=8A=A0=E8=BD=BD,=E5=8F=AA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E4=B8=80=E4=B8=AA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- packages/AliplayerV2/index.vue | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c3a0994..3778e4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-aliplayer-v2", - "version": "1.2.3", + "version": "1.2.4", "author": "yxs", "description": "感谢每一位开源的开发者. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.", "main":"lib/vue-aliplayer-v2.umd.min.js", diff --git a/packages/AliplayerV2/index.vue b/packages/AliplayerV2/index.vue index 610590c..1e40d81 100644 --- a/packages/AliplayerV2/index.vue +++ b/packages/AliplayerV2/index.vue @@ -177,12 +177,13 @@ export default { scriptTag.id = scriptID; scriptTag.src = this.scriptSrc; html[0].appendChild(scriptTag); - scriptTag.addEventListener("load", () => { - this.initPlayer(); - }); } else { this.initPlayer(); //这样是为了兼容页面上有多个播放器 } + //兼容单页加载和硬加载 + scriptTag.addEventListener("load", () => { + this.initPlayer(); + }); }, /**