|
@@ -17,7 +17,7 @@ const videoIns=ref(null)
|
|
|
|
|
|
// 弹幕状态值
|
|
|
let danmuState=reactive({
|
|
|
- show:true,//显示弹幕
|
|
|
+ show:false,//显示弹幕
|
|
|
temList:props.videoInfo.bullet_chat_list||[],
|
|
|
list:[],
|
|
|
content:'',//弹幕内容
|
|
@@ -86,6 +86,7 @@ const handleVideoPause=(e)=>{
|
|
|
emit('pause',e)
|
|
|
}
|
|
|
const handelClickPlay=()=>{
|
|
|
+ danmuState.show=true
|
|
|
emit('clickPlay',props.videoInfo)
|
|
|
}
|
|
|
const handleVideoTimeUpdate=(e)=>{
|
|
@@ -123,6 +124,11 @@ const handleSendDanmu=async ()=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const handleClickOutSideDanmuStatusChange=()=>{
|
|
|
+ if(info.value.id!=props.curVideoId) return;
|
|
|
+ danmuState.show=!danmuState.show
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -210,7 +216,7 @@ const handleSendDanmu=async ()=>{
|
|
|
|
|
|
<!-- 视频外面发弹幕输入模块 -->
|
|
|
<div class="flex outside-danmu-input-box">
|
|
|
- <div :class="danmuState.show?'show-icon':'close-icon'" @click.stop="danmuState.show=!danmuState.show"></div>
|
|
|
+ <div :class="danmuState.show?'show-icon':'close-icon'" @click.stop="handleClickOutSideDanmuStatusChange"></div>
|
|
|
<div class="flex input-box">
|
|
|
<input
|
|
|
:disabled="info.id!=props.curVideoId"
|