|
@@ -38,7 +38,7 @@
|
|
|
<view :class="['video-danmu-control-box',isFullScreen&&'isFullScreen']">
|
|
|
<view class="show-btn" v-if="!closeDM" @click.stop="closeDM=true"></view>
|
|
|
<view class="close-btn" v-else @click.stop="closeDM=false"></view>
|
|
|
- <view class="send-btn" v-if="!closeDM" @click.stop="showInput=true">发弹幕</view>
|
|
|
+ <!-- <view class="send-btn" v-if="!closeDM" @click.stop="showInput=true">发弹幕</view> -->
|
|
|
</view>
|
|
|
|
|
|
<!-- 倍速控制按钮 -->
|
|
@@ -80,8 +80,9 @@
|
|
|
focus
|
|
|
confirm-type="send"
|
|
|
:adjust-position="false"
|
|
|
- @keyboardheightchange="keyboardheightchange"
|
|
|
@confirm="handleSendDanmu"
|
|
|
+ @focus="handleDanmuInputFocus"
|
|
|
+ @blur="handleDanmuInputBlur"
|
|
|
/>
|
|
|
<text>{{danmuText.length}}/50</text>
|
|
|
</view>
|
|
@@ -152,6 +153,7 @@ export default {
|
|
|
curSpeed:'1.0',
|
|
|
|
|
|
keyboardheight:0,//键盘高度
|
|
|
+ isBlur:false,//是否弹幕输入框失焦了
|
|
|
isFullScreen:false,//是否为全屏
|
|
|
isShowControls:false,//是否显示视频的控制栏
|
|
|
|
|
@@ -210,13 +212,12 @@ export default {
|
|
|
handleControlstoggle(e){
|
|
|
this.isShowControls=e.detail.show
|
|
|
},
|
|
|
- //键盘高度变为0 则收起悬浮弹幕输入框
|
|
|
- keyboardheightchange(e){
|
|
|
+ handleDanmuInputFocus(e){
|
|
|
+ console.log(e.detail.height);
|
|
|
this.keyboardheight=e.detail.height
|
|
|
- this.handlekeyboardheight()
|
|
|
},
|
|
|
- handlekeyboardheight:debounce(function(){
|
|
|
- if(this.keyboardheight==0&&this.showInput){
|
|
|
+ handleDanmuInputBlur:debounce(function(){
|
|
|
+ if(this.showInput){
|
|
|
this.showInput=false
|
|
|
}
|
|
|
},60),
|