AI小程序端样式修复

This commit is contained in:
francis_fh
2026-01-22 14:05:22 +08:00
parent 96c89e0210
commit 80bd1ee181
6 changed files with 246 additions and 140 deletions

View File

@@ -134,9 +134,16 @@
<view class="message">{{ recognizedText }} {{ lastFinalText }}</view>
</view>
<view v-if="isTyping" class="self">
<text class="message msg-loading">
<span class="ai-loading"></span>
</text>
<view class="message msg-loading">
<div class="loading-content">
<span class="ai-loading">
<span></span>
<span></span>
<span></span>
</span>
<text class="loading-text">AI正在思考中...</text>
</div>
</view>
</view>
</view>
</scroll-view>
@@ -1005,12 +1012,26 @@ image-margin-top = 40rpx
.messageNull
display: none
.msg-loading{
background: transparent;
font-size: 24rpx;
color: #8f8d8e;
background: #F6F6F6;
border-radius: 20rpx 0 20rpx 20rpx;
padding: 20rpx;
width: fit-content;
display: flex;
align-items: flex-end;
justify-content: flex-start;
align-items: center;
justify-content: center;
.loading-content{
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
}
.loading-text{
font-size: 28rpx;
color: #666666;
font-weight: 500;
}
}
.loaded{
padding-left: 20rpx
@@ -1250,25 +1271,55 @@ image-margin-top = 40rpx
.file-border
width: 160rpx !important;
@keyframes ai-circle {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
/* 更美观的loading动画 - 兼容H5和小程序 */
@keyframes ai-loading-dots {
0%, 20%, 80%, 100% {
transform: scale(1);
opacity: 0.6;
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
40% {
transform: scale(1.2);
opacity: 1;
}
}
.ai-loading
/* 重置默认样式 */
.ai-loading {
display: inline-flex;
vertical-align: middle;
width: 28rpx;
height: 28rpx;
background: 0 0;
align-items: center;
justify-content: center;
gap: 8rpx;
width: auto;
height: auto;
background: transparent;
border: none;
border-radius: 0;
padding: 0;
margin: 0;
}
/* 三个点的样式 - 使用标准CSS语法不使用嵌套 */
.ai-loading span {
display: inline-block;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
border: 4rpx solid;
border-color: #e5e5e5 #e5e5e5 #e5e5e5 #8f8d8e;
-webkit-animation: ai-circle 1s linear infinite;
animation: ai-circle 1s linear infinite;
background-color: #256BFA;
animation: ai-loading-dots 1.4s ease-in-out infinite both;
margin: 0;
padding: 0;
}
/* 为每个点设置不同的动画延迟 */
.ai-loading span:nth-child(1) {
animation-delay: -0.32s;
}
.ai-loading span:nth-child(2) {
animation-delay: -0.16s;
}
.ai-loading span:nth-child(3) {
animation-delay: 0s;
}
</style>

View File

@@ -255,10 +255,10 @@
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
<!-- <view class="jobs-add button-click" @click="navTo('/pages/city-select/index')" style="padding-right:0;">
<view class="jobs-add button-click" @click="navTo('/pages/city-select/index')" style="padding-right:0;">
<text>{{ selectedCity.name || '地区' }}</text>
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view> -->
</view>
</view>
<view class="filter-bottom">
<view class="btm-left">