浏览代码

fix: VideoPlayer 的实例未赋值 #524

clddup 8 月之前
父节点
当前提交
0e99f8374a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/VideoPlayer/src/VideoPlayer.vue

+ 1 - 1
src/components/VideoPlayer/src/VideoPlayer.vue

@@ -21,7 +21,7 @@ const videoEl = ref<HTMLDivElement>()
 
 
 const intiPlayer = () => {
 const intiPlayer = () => {
   if (!unref(videoEl)) return
   if (!unref(videoEl)) return
-  new Player({
+  playerRef.value = new Player({
     autoplay: false,
     autoplay: false,
     ...props,
     ...props,
     el: unref(videoEl)
     el: unref(videoEl)