修改
This commit is contained in:
parent
d5cfda1b1d
commit
f3611db63b
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="content" :style="{'padding-bottom': bottomVal }">
|
||||
<!-- <view class="title">
|
||||
<image src="../../static/huijiantou.png" @click="back"></image>
|
||||
{{currentItem.senderName}}
|
||||
@ -7,7 +7,7 @@
|
||||
<!-- 聊天渲染列表 -->
|
||||
<!-- scroll-y scroll-into-view="placeholder" scroll-top="500" scroll-with-animation -->
|
||||
<u-navbar :is-back="false" :background="background" class="u-navbar">
|
||||
<image src="@/static/fanhui.png" mode="" @tap="goprevious"></image>
|
||||
<image src="@/static/pagesB/fanhui.png" mode="" @tap="goprevious"></image>
|
||||
<view class="navbartitle" @tap="goprevious">
|
||||
{{title}}
|
||||
</view>
|
||||
@ -42,8 +42,9 @@
|
||||
<!-- <image class="icon_img" :src="require('@/static/ico/often.png')" @tap="oftenx"></image> -->
|
||||
<!-- 输入框 -->
|
||||
<view class="input-box-flex-grow"> <input type="text" class="contenxxt" id="input"
|
||||
v-model="formData.content" :hold-keyboard="true" :confirm-type="'send'" :adjust-position="false"
|
||||
placeholder-style="color:#DDDDDD;" :cursor-spacing="10" @confirm='sendconfirm' /> </view>
|
||||
v-model="formData.content" :hold-keyboard="true" :confirm-type="'send'" :confirm-hold="true"
|
||||
placeholder-style="color:#DDDDDD;" :cursor-spacing="10" @confirm='sendconfirm'
|
||||
@focus="inputBindFocus" @blur="inputBindBlur" /> </view>
|
||||
<!-- 选择表情包 -->
|
||||
<!-- <image class=" icon_btn_add" :src="require('@/static/ico/emoji.png')" @tap="exprec"></image> -->
|
||||
<!-- 发送消息按钮 -->
|
||||
@ -156,6 +157,7 @@
|
||||
],
|
||||
scrollTop: 999999,
|
||||
inputboxtop: undefined,
|
||||
bottomVal: 0,
|
||||
};
|
||||
},
|
||||
onReady() { //更改导航栏文字
|
||||
@ -179,6 +181,15 @@
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
inputBindFocus(e) {
|
||||
this.bottomVal = e.detail.height + 'px'
|
||||
// 获取手机键盘的高度,赋值给input 所在盒子的 bottom 值
|
||||
// 注意!!! 这里的 px 至关重要!!! 我搜到的很多解决方案都没有说这里要添加 px
|
||||
},
|
||||
inputBindBlur() {
|
||||
this.bottomVal = 0
|
||||
// input 失去焦点,键盘隐藏,设置 input 所在盒子的 bottom 值为0
|
||||
},
|
||||
getPageHistory() {
|
||||
let obj = {
|
||||
consultationId: this.currentItem.id,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user