|
@@ -3,7 +3,7 @@
|
|
|
<!-- 侧边栏 -->
|
|
|
<navbar :chatAsset="chatAsset" @click="getInputList" @history="getHistory" @delete="msgList = []" />
|
|
|
<!-- 主体 -->
|
|
|
- <view class="w100 relative">
|
|
|
+ <view class="w100 relative flex direction">
|
|
|
<!-- 标题栏 -->
|
|
|
<view class="title w100 flex item-center content-center size-large">
|
|
|
{{ `AirSmartChat(${this.model})` }}
|
|
@@ -16,7 +16,7 @@
|
|
|
</view>
|
|
|
</view> -->
|
|
|
<!-- 聊天区 -->
|
|
|
- <view class="chat size-large">
|
|
|
+ <view class="chat size-large" style="flex:1">
|
|
|
<block v-for="(x, i) in msgList" :key="i">
|
|
|
<!-- 用户消息 -->
|
|
|
<view v-if="x.my && x.type === 'msg'" class="chat-item " style="background-color: rgba(247,247,248,0.7);">
|
|
@@ -48,7 +48,7 @@
|
|
|
</block>
|
|
|
</view>
|
|
|
<!-- 底部 -->
|
|
|
- <view class="w100 p-20 absolute flex b0 direction item-center background-color-white" style="height: 180px">
|
|
|
+ <view class="w100 p-20 flex direction item-center background-color-white">
|
|
|
<view class="w100">
|
|
|
<view class="list flex wrap gap">
|
|
|
<uni-transition v-for="item in inputTipList" :key="item.type" :duration="500" show
|
|
@@ -61,9 +61,9 @@
|
|
|
<!-- 输入框 -->
|
|
|
<view class="w100">
|
|
|
<view class="send-message relative box-shadow mt-10 radius border-gray">
|
|
|
- <textarea class="w100" v-model="msg" auto-height maxlength="5000" cursor-spacing="10"
|
|
|
- :adjust-position="false" :placeholder="loading ? 'AirSmart is loading...' : 'Send a message'"
|
|
|
- @confirm="sendMsg" @input="handleInput" @keydown.tab.native.prevent="handleTab" />
|
|
|
+ <textarea v-model="msg" auto-height maxlength="5000" cursor-spacing="10" :adjust-position="false"
|
|
|
+ :placeholder="loading ? 'AirSmart is loading...' : 'Send a message'" @confirm="sendMsg"
|
|
|
+ @input="handleInput" @keydown.tab.native.prevent="handleTab" />
|
|
|
<uni-icons class="send-btn absolute cursor-pointer" type="paperplane-filled" size="24"
|
|
|
:color="msg ? '#19c37d' : '#4559a480'" @click="sendMsg" />
|
|
|
</view>
|
|
@@ -210,7 +210,7 @@
|
|
|
this.loading = true
|
|
|
|
|
|
// ======== 开发环境模拟回复 ========
|
|
|
- // return this.mockReply()
|
|
|
+ return this.mockReply()
|
|
|
// ======== 开发环境模拟回复 ========
|
|
|
|
|
|
if (this.calcAsset() === false) {
|
|
@@ -426,7 +426,6 @@
|
|
|
}
|
|
|
|
|
|
.chat {
|
|
|
- height: calc(100% - 245px);
|
|
|
overflow-y: auto;
|
|
|
|
|
|
.chat-item {
|
|
@@ -458,6 +457,9 @@
|
|
|
}
|
|
|
|
|
|
uni-textarea {
|
|
|
+ width: calc(100% - 30px);
|
|
|
+ max-height: 400rpx;
|
|
|
+ overflow-y: auto;
|
|
|
padding: 15px 20px;
|
|
|
line-height: 1.6;
|
|
|
}
|