Fix:4004 【商城小程序】在互动消息列表回复资讯评论,内容被顶至屏幕之外
(cherry picked from commit 7a44ed3265)
This commit is contained in:
@@ -71,10 +71,11 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showBtn" class="v12-align-center v12-justify-center v12-pa-3 v12-white sticky-bottom">
|
<view v-show="showBtn" class="v12-align-center v12-justify-center v12-pa-3 v12-white sticky-bottom" :style="{ bottom: inputBoxBottom + 'px' }">
|
||||||
<view style="width: 100%">
|
<view style="width: 100%">
|
||||||
<u-textarea
|
<u-textarea
|
||||||
id="input"
|
id="input"
|
||||||
|
fixed
|
||||||
v-model="content"
|
v-model="content"
|
||||||
:maxlength="500"
|
:maxlength="500"
|
||||||
:maxheight="200"
|
:maxheight="200"
|
||||||
@@ -87,6 +88,7 @@
|
|||||||
border: '1px solid #f7f7f7',
|
border: '1px solid #f7f7f7',
|
||||||
borderRadius: '20rpx'
|
borderRadius: '20rpx'
|
||||||
}"
|
}"
|
||||||
|
:adjustPosition="false"
|
||||||
cursorSpacing="85"
|
cursorSpacing="85"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
@focus="commentInputFocus"
|
@focus="commentInputFocus"
|
||||||
@@ -149,13 +151,32 @@ export default {
|
|||||||
content: '',
|
content: '',
|
||||||
currentComment: {},
|
currentComment: {},
|
||||||
// 光标位置
|
// 光标位置
|
||||||
cursorIndex: 0
|
cursorIndex: 0,
|
||||||
|
inputBoxBottom: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
// 监听键盘高度变化
|
||||||
|
uni.onKeyboardHeightChange((res) => {
|
||||||
|
if (res.height) {
|
||||||
|
this.onKeyboardShow(res.height)
|
||||||
|
} else {
|
||||||
|
this.onKeyboardHide()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
onKeyboardShow(height) {
|
||||||
|
this.inputBoxBottom = height
|
||||||
|
},
|
||||||
|
onKeyboardHide() {
|
||||||
|
// 处理键盘收起逻辑
|
||||||
|
this.inputBoxBottom = 0
|
||||||
|
},
|
||||||
toInfo(comment) {
|
toInfo(comment) {
|
||||||
if(!comment.contentAvailable) {
|
if(!comment.contentAvailable) {
|
||||||
// 该内容已删除
|
// 该内容已删除
|
||||||
|
|||||||
Reference in New Issue
Block a user