feat: 搞了一个loading 上去

This commit is contained in:
zoujing
2025-09-02 17:02:55 +08:00
parent 5b852235b9
commit 663df81099
3 changed files with 309 additions and 3 deletions

View File

@@ -2,11 +2,12 @@
<view class="container">
<view class="chat-ai">
<view class="loading-container">
<image
<!-- <image
v-if="isLoading"
class="loading-img"
src="/static/msg_loading.svg"
/>
/> -->
<loading v-if="isLoading" />
<ChatMarkdown :key="textKey" :text="processedText" />
</view>
<slot name="content"></slot>
@@ -18,6 +19,7 @@
<script setup>
import { defineProps, computed, ref, watch } from "vue";
import ChatMarkdown from "./ChatMarkdown.vue";
import loading from "@/pages/loading/loading.vue";
const props = defineProps({
text: {
@@ -73,7 +75,7 @@ watch(
margin: 6px 12px;
padding: 0 12px;
max-width: 100%; // ✅ 限制最大宽度
min-width: 90px;
min-width: 100px;
background: rgba(255, 255, 255, 0.4);
box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px 20px 20px 20px;