Skip to content

Commit

Permalink
docs: fix vue dom work
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Aug 16, 2022
1 parent d905e0e commit a0424ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/.vuepress/components/DPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit a0424ca

Please sign in to comment.