feat: 长文本组件的详情页面调整

This commit is contained in:
2026-03-26 23:47:11 +08:00
parent e6bc20b9e1
commit b862c061a2
2 changed files with 14 additions and 9 deletions

View File

@@ -32,15 +32,11 @@
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
} },
,
{ {
"path": "pages/long-answer/index", "path": "pages/long-answer/index",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom"
"backgroundColor": "#FFFFFF",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
} }
} }
], ],

View File

@@ -1,9 +1,16 @@
<template> <template>
<ChatMarkdown :text="answerText" /> <view class="bg-F5F7FA flex flex-col h-screen overflow-hidden">
<TopNavBar title="详情" backgroundColor="transparent" />
<view class="flex-full overflow-hidden scroll-y p-12 border-box">
<ChatMarkdown :text="answerText" />
</view>
</view>
</template> </template>
<script setup> <script setup>
import TopNavBar from "@/components/TopNavBar/index.vue";
import ChatMarkdown from "../index/components/chat/ChatMarkdown/index.vue"; import ChatMarkdown from "../index/components/chat/ChatMarkdown/index.vue";
import { defineProps, onLoad } from "vue"; import { defineProps, ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
const props = defineProps({ const props = defineProps({
answerText: { answerText: {
@@ -12,8 +19,10 @@ const props = defineProps({
} }
}); });
const answerText = ref(props.answerText || "");
onLoad(({ message = "" }) => { onLoad(({ message = "" }) => {
props.answerText = decodeURIComponent(message); answerText.value = decodeURIComponent(message);
}); });
</script> </script>