不允许缩放 安卓键盘问题
This commit is contained in:
parent
88d0431eb4
commit
7f5cf72d46
|
@ -3,8 +3,9 @@
|
|||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
|
||||
<title>优享地图</title>
|
||||
</head>
|
||||
<script type="text/javascript" src="https://api.tianditu.gov.cn/api?v=4.0&tk=4e6d9067f64ad8101ca0f4ceb7cb4083" crossorigin></script>
|
||||
|
|
|
@ -255,14 +255,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="recomand">
|
||||
<!-- <div class="recomand">
|
||||
<div v-for="(v, i) in recomanTags" :key="i" @click="cksend(v)" class="recomand_itm"> {{ v }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="c_bottom">
|
||||
<img src="../assets/3.png">
|
||||
<input v-model="inputText" type="text" placeholder="有问题尽管问我~" @keydown.enter="sendMessage"
|
||||
<input v-model="inputText" @focus="handleInputFocus" type="text" placeholder="有问题尽管问我~" @keydown.enter="sendMessage"
|
||||
class="sendinput" />
|
||||
<div class="w_icon">
|
||||
<img src="../assets/4.png" alt="">
|
||||
|
@ -308,6 +308,10 @@ const cksend = (val) => {
|
|||
}
|
||||
|
||||
}
|
||||
const handleInputFocus = () => {
|
||||
console.log("聚焦了");
|
||||
scollToButtom();
|
||||
}
|
||||
const sendMessage = () => {
|
||||
console.log("信息发送成功", inputText.value);
|
||||
let messageValue = inputText.value.trim()
|
||||
|
@ -370,12 +374,24 @@ const goke = () => {
|
|||
const bookDoctor = () => {
|
||||
location.href = 'https://wx.nbgzjk.cn/#/home'
|
||||
};
|
||||
// const scollToButtom = () => {
|
||||
// nextTick(() => {
|
||||
// let chatForm = document.getElementById('chatform'); // 获取对象
|
||||
// if (chatForm) {
|
||||
// chatForm.scrollTop = chatForm.scrollHeight+99999; // 滚动高度
|
||||
// console.log("滚动",chatForm.scrollTop);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
const scollToButtom = () => {
|
||||
nextTick(() => {
|
||||
let chatForm = document.getElementById('chatform'); // 获取对象
|
||||
setTimeout(() => { // 增加延迟等待页面布局调整
|
||||
let chatForm = document.getElementById('chatform');
|
||||
if (chatForm) {
|
||||
chatForm.scrollTop = chatForm.scrollHeight; // 滚动高度
|
||||
chatForm.scrollTop = chatForm.scrollHeight - chatForm.clientHeight; // 调整滚动逻辑
|
||||
console.log("滚动", chatForm.scrollTop);
|
||||
}
|
||||
}, 300); // 延迟时间可以根据实际情况调整
|
||||
});
|
||||
}
|
||||
/* watch(inputText, (newValue, oldValue) => {
|
||||
|
|
Loading…
Reference in New Issue