Skip to content

Commit aa0ca34

Browse files
committed
fix: 优化图文混排问题&双标题问题
1 parent 290e60b commit aa0ca34

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ Component({
126126
},
127127
voiceRecognizing: false,
128128
speedList: [2, 1.5, 1.25, 1, 0.75],
129+
showBotName: true,
129130
},
130131
attached: async function () {
131132
const chatMode = this.data.chatMode;

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.wxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
</view>
4848
<!-- </view> -->
4949
</view>
50-
<view class="navBar" wx:if="{{chatMode === 'bot'}}">
51-
<view class="nav-content" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
50+
<view class="navBar {{showBotName ? 'showBotName' : 'hiddenBotName'}}" wx:if="{{chatMode === 'bot'}}">
51+
<view class="nav-content {{showBotName ? 'showBotName' : 'hiddenBotName'}}" style="{{showMultiConversation ? 'justify-content: space-between;' : ''}}">
5252
<image wx:if="{{bot.botId && showMultiConversation}}" bind:tap="openDrawer" class="con-icon" src="./imgs/indent-right.svg" mode="aspectFill"/>
5353
<!-- <image src="{{bot.avatar}}" mode="aspectFill" class="bot-avatar"/> -->
54-
<text class="bot-name">{{bot.name}}</text>
54+
<text wx:if="{{showBotName}}" class="bot-name">{{bot.name}}</text>
5555
<image wx:if="{{bot.botId && showMultiConversation}}" class="con-icon" bind:tap="createNewConversation" src="./imgs/chat-bubble-add.svg" mode="aspectFill"/>
5656
</view>
5757
</view>

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/index.wxss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
touch-action: none; /* 增强禁止滚动效果 */
1313
}
1414

15+
.showBotName {
16+
height: 62px;
17+
}
18+
19+
.hiddenBotName {
20+
margin-top: 2px;
21+
margin-bottom: 2px;
22+
}
23+
1524
.nav {
1625
width: 750rpx;
1726
padding: 20px 0px 0px 0px;
@@ -22,7 +31,7 @@
2231
}
2332

2433
.navBar {
25-
height: 62px;
34+
/* height: 62px; */
2635
width: 100%;
2736
box-shadow: 0 16px 16px #fff;
2837
/* background: linear-gradient(to bottom,
@@ -73,7 +82,7 @@
7382
}
7483

7584
.nav-content {
76-
height:62px;
85+
/* height:62px; */
7786
display: flex;
7887
align-items: center;
7988
justify-content: space-around;

apps/miniprogram-agent-ui/miniprogram/components/agent-ui/wd-markdown/index.wxss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
.wd-markdown ._table ._td > ._p {
120120
min-height: 1em;
121121
}
122+
123+
.wd-markdown image {
124+
width: 480rpx !important;
125+
height: 480rpx !important;
126+
}
122127
/*!
123128
Theme: GitHub
124129
Description: Light theme as seen on github.com

0 commit comments

Comments
 (0)