Showing
1 changed file
with
17 additions
and
3 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-04-07 10:15:55 | 2 | * @Date: 2024-04-07 10:15:55 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-04-16 14:19:41 | 4 | + * @LastEditTime: 2024-04-18 07:00:44 |
| 5 | * @FilePath: /fxPark/src/views/fxPark/index.vue | 5 | * @FilePath: /fxPark/src/views/fxPark/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | <div class="quick-entrance-item" @click="goToAudio"> | 12 | <div class="quick-entrance-item" @click="goToAudio"> |
| 13 | <van-icon size="3.5rem" name="https://cdn.ipadbiz.cn/xfPark/index/btn-1.1713148257.png" /> | 13 | <van-icon size="3.5rem" name="https://cdn.ipadbiz.cn/xfPark/index/btn-1.1713148257.png" /> |
| 14 | </div> | 14 | </div> |
| 15 | - <div class="quick-entrance-item"> | 15 | + <div class="quick-entrance-item" @click="goToExhibition"> |
| 16 | <van-icon size="3.5rem" name="https://cdn.ipadbiz.cn/xfPark/index/btn-2.1713148257.png" /> | 16 | <van-icon size="3.5rem" name="https://cdn.ipadbiz.cn/xfPark/index/btn-2.1713148257.png" /> |
| 17 | </div> | 17 | </div> |
| 18 | <div class="quick-entrance-item" @click="goToPoster"> | 18 | <div class="quick-entrance-item" @click="goToPoster"> |
| ... | @@ -42,6 +42,7 @@ | ... | @@ -42,6 +42,7 @@ |
| 42 | label="" | 42 | label="" |
| 43 | type="text" | 43 | type="text" |
| 44 | placeholder="请输入留言" | 44 | placeholder="请输入留言" |
| 45 | + @focus="onDanmuFocus" | ||
| 45 | @blur="onDanmuBlur" | 46 | @blur="onDanmuBlur" |
| 46 | @keydown.enter="handleEnterPress" | 47 | @keydown.enter="handleEnterPress" |
| 47 | enterkeyhint="send" | 48 | enterkeyhint="send" |
| ... | @@ -169,7 +170,7 @@ const spaceDiv = ref(false); // 占位符 | ... | @@ -169,7 +170,7 @@ const spaceDiv = ref(false); // 占位符 |
| 169 | const commentsBtn = () => { // 点击留言输入框 | 170 | const commentsBtn = () => { // 点击留言输入框 |
| 170 | show_danmu_message.value = true; | 171 | show_danmu_message.value = true; |
| 171 | nextTick(() => { | 172 | nextTick(() => { |
| 172 | - spaceDiv.value = true; | 173 | + // spaceDiv.value = true; |
| 173 | RefDanmu.value.focus(); | 174 | RefDanmu.value.focus(); |
| 174 | }); | 175 | }); |
| 175 | } | 176 | } |
| ... | @@ -193,6 +194,16 @@ const onDanmuBlur = (evt) => { // 弹幕输入框失去焦点 | ... | @@ -193,6 +194,16 @@ const onDanmuBlur = (evt) => { // 弹幕输入框失去焦点 |
| 193 | spaceDiv.value = false; | 194 | spaceDiv.value = false; |
| 194 | document.body.scrollIntoView({behavior: 'smooth'}); | 195 | document.body.scrollIntoView({behavior: 'smooth'}); |
| 195 | } | 196 | } |
| 197 | +const onDanmuFocus = (evt) => { | ||
| 198 | + spaceDiv.value = true; | ||
| 199 | + // const u = navigator.userAgent | ||
| 200 | + // if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { // 安卓手机 | ||
| 201 | + // } else { // ios | ||
| 202 | + // setTimeout(() => { | ||
| 203 | + // document.getElementsByTagName('body')[0].style.height = '400px' | ||
| 204 | + // }, 50) | ||
| 205 | + // } | ||
| 206 | +} | ||
| 196 | 207 | ||
| 197 | const handleEnterPress = (evt) => { // 小键盘回车回调 | 208 | const handleEnterPress = (evt) => { // 小键盘回车回调 |
| 198 | if (evt.keyCode === 13) { | 209 | if (evt.keyCode === 13) { |
| ... | @@ -220,6 +231,9 @@ const goToPoster = () => { // 海报列表按钮 | ... | @@ -220,6 +231,9 @@ const goToPoster = () => { // 海报列表按钮 |
| 220 | const goToAudio = () => { // 播放音频列表 | 231 | const goToAudio = () => { // 播放音频列表 |
| 221 | go('/audio'); | 232 | go('/audio'); |
| 222 | } | 233 | } |
| 234 | +const goToExhibition = () => { // 展览介绍 | ||
| 235 | + go('/exhibition'); | ||
| 236 | +} | ||
| 223 | 237 | ||
| 224 | const onCloseDanmu = () => { // 弹幕开关 | 238 | const onCloseDanmu = () => { // 弹幕开关 |
| 225 | show_danmu.value = !show_danmu.value; | 239 | show_danmu.value = !show_danmu.value; | ... | ... |
-
Please register or login to post a comment