vear:添加返回按钮,唤醒键盘
This commit is contained in:
@@ -63,8 +63,9 @@
|
||||
<header class="head">
|
||||
<view class="main-header">
|
||||
<image src="/static/icon/Hamburger-button.png" @click="toggleDrawer"></image>
|
||||
<!-- <view class="title">{{ config.appInfo.areaName }}岗位推荐</view> -->
|
||||
<!-- <view class="title">{{ config.appInfo.areaName }}岗位推荐</view> -->
|
||||
<view class="back-home-btn" @click="navTo('/pages/index/index')">
|
||||
<text class="back-home-text">返回</text>
|
||||
</view>
|
||||
<image src="/static/icon/Comment-one.png" @click="addNewDialogue"></image>
|
||||
</view>
|
||||
</header>
|
||||
@@ -375,6 +376,19 @@ footer-height = 98rpx
|
||||
image
|
||||
width: 36rpx;
|
||||
height: 37rpx;
|
||||
.back-home-btn
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
padding: 0 20rpx
|
||||
height: 60rpx
|
||||
border-radius: 12rpx
|
||||
&:active
|
||||
background: rgba(0, 0, 0, 0.05)
|
||||
.back-home-text
|
||||
font-size: 30rpx
|
||||
color: #333
|
||||
font-weight: 500
|
||||
|
||||
.chatmain-warpper
|
||||
height: 'calc(100% - %s)' %( header-height + footer-height)
|
||||
|
||||
@@ -227,8 +227,12 @@
|
||||
placeholder-class="inputplaceholder"
|
||||
class="input"
|
||||
@confirm="sendMessage"
|
||||
@click="handleInputClick"
|
||||
@focus="handleInputFocus"
|
||||
:disabled="isTyping"
|
||||
:adjust-position="true"
|
||||
:focus="inputFocused"
|
||||
cursor-spacing="20"
|
||||
placeholder="请输入您想找的岗位信息或就政策信息【比如:设计师、10000-12000、广州】【比如:今年喀什地区高校毕业生有什么就业政策】"
|
||||
v-show="!isVoice"
|
||||
/>
|
||||
@@ -439,6 +443,7 @@ const feebackData = ref(null);
|
||||
// 删除功能相关状态
|
||||
const isSelectMode = ref(false);
|
||||
const selectedMessages = ref([]);
|
||||
const inputFocused = ref(false);
|
||||
// ref for DOM element
|
||||
const voiceBtn = ref(null);
|
||||
const feeback = ref(null);
|
||||
@@ -1357,6 +1362,22 @@ function closeFile() {
|
||||
showfile.value = false;
|
||||
}
|
||||
|
||||
function handleInputClick() {
|
||||
inputFocused.value = false;
|
||||
nextTick(() => {
|
||||
inputFocused.value = true;
|
||||
});
|
||||
console.log('[键盘] 点击输入框,尝试唤起键盘');
|
||||
}
|
||||
|
||||
function handleInputFocus() {
|
||||
console.log('[键盘] 输入框已获得焦点,键盘应已弹出');
|
||||
$api.msg('输入框已激活');
|
||||
nextTick(() => {
|
||||
scrollToBottom();
|
||||
});
|
||||
}
|
||||
|
||||
function copyMarkdown(value) {
|
||||
$api.copyText(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user