feat: 组件的数据结构调整
This commit is contained in:
@@ -33,6 +33,7 @@ import ChatMarkdown from "../../ChatMain/ChatMarkdown/index.vue";
|
||||
import ChatLoading from "../../ChatMain/ChatLoading/index.vue";
|
||||
import StreamManager from '@/utils/StreamManager.js';
|
||||
import {
|
||||
LONG_TEXT_KEYS,
|
||||
getLongTextPreviewText,
|
||||
getLongTextValue,
|
||||
hasLongTextExtraSections,
|
||||
@@ -55,12 +56,12 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const tag = computed(() => getLongTextValue(props.longTextData, "tag"));
|
||||
const title = computed(() => getLongTextValue(props.longTextData, "title"));
|
||||
const tag = computed(() => getLongTextValue(props.longTextData, LONG_TEXT_KEYS.tag));
|
||||
const title = computed(() => getLongTextValue(props.longTextData, LONG_TEXT_KEYS.title));
|
||||
const longAnswerTagColor = ref(pickRandomTagToneColor());
|
||||
const longAnswerTagStyle = computed(() => buildTagToneStyle(longAnswerTagColor.value));
|
||||
const previewContent = computed(() => {
|
||||
return getLongTextPreviewText(props.longTextData, ["content_summary"]);
|
||||
return getLongTextPreviewText(props.longTextData, [LONG_TEXT_KEYS.contentSummary]);
|
||||
});
|
||||
|
||||
// 处理文本内容:按行截断以保证预览最多显示两行(更贴近视觉行数)
|
||||
|
||||
Reference in New Issue
Block a user