docs: fix vue dom work

This commit is contained in:
DIYgod 2022-08-16 01:11:14 +01:00
parent d905e0ed4b
commit a0424ca303
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
1 changed files with 6 additions and 2 deletions

View File

@ -71,12 +71,16 @@ export default {
methods: {
load: function () {
this.options.container = this.$refs.dplayer;
this.dplayer = new window.DPlayer(this.options);
setTimeout(() => {
this.dplayer = new window.DPlayer(this.options);
}, 0);
}
},
mounted: function () {
if (this.immediate) {
this.dplayer = new window.DPlayer(this.options);
setTimeout(() => {
this.dplayer = new window.DPlayer(this.options);
}, 0);
}
},
beforeDestroy: function () {