소스 검색

fix: VideoPlayer 的实例未赋值 #524

clddup 1 년 전
부모
커밋
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 = () => {
   if (!unref(videoEl)) return
-  new Player({
+  playerRef.value = new Player({
     autoplay: false,
     ...props,
     el: unref(videoEl)