Fix(AI):[#3600]键盘弹出后,开启新对话,及键盘底部会被遮挡一部分
This commit is contained in:
@@ -141,10 +141,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
promptInputFocusHandle() {
|
||||
this.inputOnFocus = true
|
||||
setTimeout(() => {
|
||||
this.inputOnFocus = true
|
||||
this.$emit('focus', 1)
|
||||
}, 200)
|
||||
},
|
||||
promptInputBlurHandle() {
|
||||
this.inputOnFocus = false
|
||||
setTimeout(() => {
|
||||
this.inputOnFocus = false
|
||||
this.$emit('focus', 0)
|
||||
}, 200)
|
||||
},
|
||||
toggleInputModel() {
|
||||
if (!this.token) {
|
||||
|
||||
@@ -21,6 +21,7 @@ export const chatMixins = {
|
||||
statusBarHeight: 20,
|
||||
fileHttpStr: Object.freeze(VUE_APP_API_URL + settings.sysPrefix),
|
||||
optionsFrom: '',
|
||||
onFocus: false,
|
||||
loading: false,
|
||||
chatNumber: '',
|
||||
infoResData: {},
|
||||
@@ -86,6 +87,9 @@ export const chatMixins = {
|
||||
createdCallbak() {
|
||||
console.log('页面初始话回调')
|
||||
},
|
||||
inputFocusHandle(value) {
|
||||
this.onFocus = value === 1
|
||||
},
|
||||
historyViewHandle() {
|
||||
console.log(this.$refs.historyView)
|
||||
this.$refs.historyView.showView()
|
||||
|
||||
@@ -130,7 +130,12 @@
|
||||
<view id="bottom_postion" class="bottom-postion" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-to-bottom">
|
||||
<view
|
||||
:class="{
|
||||
'focus': onFocus
|
||||
}"
|
||||
class="page-to-bottom"
|
||||
>
|
||||
<image
|
||||
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
|
||||
:src="webUrl + '/aiChat/down.png'"
|
||||
@@ -144,6 +149,7 @@
|
||||
:loading="loading"
|
||||
@send="streamReq"
|
||||
@history="historyViewHandle"
|
||||
@focus="inputFocusHandle"
|
||||
/>
|
||||
<AiHistoryList
|
||||
ref="historyView"
|
||||
|
||||
+13
-7
@@ -181,7 +181,12 @@
|
||||
<view id="bottom_postion" class="bottom-postion" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-to-bottom">
|
||||
<view
|
||||
:class="{
|
||||
'focus': onFocus
|
||||
}"
|
||||
class="page-to-bottom"
|
||||
>
|
||||
<view
|
||||
v-if="chatNumber"
|
||||
class="new-chat"
|
||||
@@ -208,6 +213,7 @@
|
||||
@send="streamReq"
|
||||
@add="createNewHandle"
|
||||
@history="historyViewHandle"
|
||||
@focus="inputFocusHandle"
|
||||
/>
|
||||
<AiHistoryList
|
||||
ref="historyView"
|
||||
@@ -318,7 +324,7 @@ export default {
|
||||
padding: 30rpx;
|
||||
margin: 0 0 0 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx 12rpx 30rpx rgba(0,0,0,0.1);
|
||||
.trangle {
|
||||
@@ -354,7 +360,7 @@ export default {
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: #3D4CF1;
|
||||
}
|
||||
.icon {
|
||||
@@ -375,11 +381,11 @@ export default {
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40rpx;
|
||||
padding: 0 12rpx;
|
||||
height: 48rpx;
|
||||
padding: 0 18rpx;
|
||||
margin: 0 30rpx 30rpx 0;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
background: rgba(255,255,255,0.39);
|
||||
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.1);
|
||||
|
||||
@@ -97,6 +97,10 @@ page {
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 24rpx;
|
||||
transition: all 0.2s;
|
||||
&.focus {
|
||||
transform: translateY(-40rpx);
|
||||
}
|
||||
.new-chat {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -132,7 +136,7 @@ page {
|
||||
padding: 24rpx 24rpx 48rpx 24rpx;
|
||||
transition: all 0.2s;
|
||||
&.focus {
|
||||
transform: translateY(-48rpx);
|
||||
transform: translateY(-40rpx);
|
||||
}
|
||||
.bottom-body {
|
||||
position: relative;
|
||||
@@ -329,7 +333,6 @@ page {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin: 0 0 8rpx 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.item-left {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user