diff --git a/changelog.md b/changelog.md
index b55259b7f26a84db6f74c949915be9bea7ec81f7..df6e2f69dd4782e8f7fdae1be1b01984a4752d9f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,5 @@
+## 1.1.1(2023-06-09)
+- 修复 web-pc端样式错误
## 1.1.0(2023-06-09)
- 【重要】优化`uni-ai-chat`云对象的`send`方法性能(并发:“普通消息对话”和“获得内容总结”),大幅提高会话响应速度。
- 修复 手机端 当消息列表数据不满一屏幕时,键盘弹出后看不到历史消息
diff --git a/components/uni-ai-msg/uni-ai-msg.vue b/components/uni-ai-msg/uni-ai-msg.vue
index db076920c9e274a94ea289a2054bb0de3ccd4b2e..355642667b7b27c1bbca2b5c7749e3270b0389ba 100644
--- a/components/uni-ai-msg/uni-ai-msg.vue
+++ b/components/uni-ai-msg/uni-ai-msg.vue
@@ -176,8 +176,13 @@
let htmlString = ''
// 修改转换结果的htmlString值 用于正确给界面增加鼠标闪烁的效果
// 判断markdown中代码块标识符的数量是否为偶数
- if (this.msgContent.split("```").length % 2) {
- htmlString = markdownIt.render(this.msgContent)+ '|';
+ if (this.msgContent.split("```").length % 2) {
+ let msgContent = this.msgContent
+ if(msgContent[msgContent.length-1] != '\n'){
+ msgContent += '\n'
+ }
+ msgContent += ' |'
+ htmlString = markdownIt.render(msgContent);
} else {
htmlString = markdownIt.render(this.msgContent) + ' \n |';
}
diff --git a/package.json b/package.json
index b6a8751760261768e8eeae611e3fc3e1300c734a..591bebdcb2a2007111f243aba20441205562a745 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-ai-chat",
"name": "uni-ai-chat",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "基于uni-ai的聊天示例项目,支持流式、支持前文总结,云端一体",
"main": "main.js",
"scripts": {
diff --git a/pages/chat/chat.vue b/pages/chat/chat.vue
index 511f5e7bac8739d984a214d6aacfa5b6bcaadded..8ccf7876d28171bf3deb9991e9a7d86552748739 100644
--- a/pages/chat/chat.vue
+++ b/pages/chat/chat.vue
@@ -552,7 +552,7 @@
let messages = []
// 复制一份,消息列表数据
- let msgs = msgList.filter(i => i.isDelete !== true)
+ let msgs = Array.from(msgList).filter(i => i.isDelete !== true)
// 带总结的消息 index
let findIndex = [...msgs].reverse().findIndex(item => item.summarize)
// console.log('findIndex', findIndex)
@@ -795,7 +795,8 @@
@import "@/components/uni-ai-msg/uni-ai-msg.scss";
/* #endif */
- /* #ifndef APP-NVUE */
+ /* #ifndef APP-NVUE */
+ page,
.container *,
view,
textarea,
@@ -960,15 +961,21 @@
border-top: solid 1px #dde0e2;
}
- .container * {
+ .container,.container * {
max-width: 950px;
}
.container {
- box-shadow: 0 0 5px #e0e1e7;
- margin-top: 44px;
+ box-shadow: 0 0 5px #e0e1e7;
+ height: calc(100vh - 44px);
+ margin: 22px auto;
border-radius: 10px;
- overflow: hidden;
+ overflow: hidden;
+ background-color: #FAFAFA;
+ }
+
+ page {
+ background-color: #efefef;
}
.container .header {