hookehuyr

fix

<!--
* @Date: 2024-04-07 10:15:55
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-04-16 14:19:41
* @LastEditTime: 2024-04-18 07:00:44
* @FilePath: /fxPark/src/views/fxPark/index.vue
* @Description: 首页
-->
......@@ -12,7 +12,7 @@
<div class="quick-entrance-item" @click="goToAudio">
<van-icon size="3.5rem" name="https://cdn.ipadbiz.cn/xfPark/index/btn-1.1713148257.png" />
</div>
<div class="quick-entrance-item">
<div class="quick-entrance-item" @click="goToExhibition">
<van-icon size="3.5rem" name="https://cdn.ipadbiz.cn/xfPark/index/btn-2.1713148257.png" />
</div>
<div class="quick-entrance-item" @click="goToPoster">
......@@ -42,6 +42,7 @@
label=""
type="text"
placeholder="请输入留言"
@focus="onDanmuFocus"
@blur="onDanmuBlur"
@keydown.enter="handleEnterPress"
enterkeyhint="send"
......@@ -169,7 +170,7 @@ const spaceDiv = ref(false); // 占位符
const commentsBtn = () => { // 点击留言输入框
show_danmu_message.value = true;
nextTick(() => {
spaceDiv.value = true;
// spaceDiv.value = true;
RefDanmu.value.focus();
});
}
......@@ -193,6 +194,16 @@ const onDanmuBlur = (evt) => { // 弹幕输入框失去焦点
spaceDiv.value = false;
document.body.scrollIntoView({behavior: 'smooth'});
}
const onDanmuFocus = (evt) => {
spaceDiv.value = true;
// const u = navigator.userAgent
// if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { // 安卓手机
// } else { // ios
// setTimeout(() => {
// document.getElementsByTagName('body')[0].style.height = '400px'
// }, 50)
// }
}
const handleEnterPress = (evt) => { // 小键盘回车回调
if (evt.keyCode === 13) {
......@@ -220,6 +231,9 @@ const goToPoster = () => { // 海报列表按钮
const goToAudio = () => { // 播放音频列表
go('/audio');
}
const goToExhibition = () => { // 展览介绍
go('/exhibition');
}
const onCloseDanmu = () => { // 弹幕开关
show_danmu.value = !show_danmu.value;
......