feat: 组件的数据结构调整
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
:value="section.parsedValue !== null ? section.parsedValue : section.contentValue"
|
||||
/>
|
||||
|
||||
<ChatMarkdown v-else-if="section.contentKey === LONG_TEXT_KEYS.content" :text="section.contentValue" />
|
||||
|
||||
<ChatMarkdown v-else :text="section.contentValue" />
|
||||
</template>
|
||||
|
||||
@@ -65,16 +63,13 @@ const longAnswerTagStyle = computed(() => buildTagToneStyle(longAnswerTagColor.v
|
||||
|
||||
let unsubscribe = null;
|
||||
|
||||
const HIDDEN_DETAIL_SECTION_KEYS = [
|
||||
LONG_TEXT_KEYS.containerType,
|
||||
];
|
||||
const HIDDEN_DETAIL_SECTION_KEYS = [];
|
||||
|
||||
const shouldUseParsedValueView = (section) => {
|
||||
return (
|
||||
section.fromLongTextData &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.tag &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.title &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.content &&
|
||||
!HIDDEN_DETAIL_SECTION_KEYS.includes(section.contentKey)
|
||||
);
|
||||
};
|
||||
@@ -227,7 +222,7 @@ onLoad(({ message = "", streamId = "", finished = "0", tagToneColor = "" }) => {
|
||||
answerText.value = text || "";
|
||||
longTextData.value = payload || null;
|
||||
title.value = computeTitle(
|
||||
getLongTextValue(longTextData.value, "title") || answerText.value
|
||||
getLongTextValue(longTextData.value, LONG_TEXT_KEYS.title) || answerText.value
|
||||
);
|
||||
|
||||
nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user