feat: 长文本组件调整
This commit is contained in:
@@ -33,7 +33,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const IGNORED_FIELD_KEYS = ["container_type", "content", "components"];
|
||||
const IGNORED_FIELD_KEYS = ["container_type", "content", "content_summary", "components"];
|
||||
|
||||
const isArrayValue = (value) => Array.isArray(value);
|
||||
|
||||
|
||||
@@ -62,12 +62,18 @@ const longTextData = ref(null);
|
||||
|
||||
let unsubscribe = null;
|
||||
|
||||
const HIDDEN_DETAIL_SECTION_KEYS = [
|
||||
LONG_TEXT_KEYS.containerType,
|
||||
LONG_TEXT_KEYS.contentSummary,
|
||||
];
|
||||
|
||||
const shouldUseParsedValueView = (section) => {
|
||||
return (
|
||||
section.fromLongTextData &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.tag &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.title &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.content
|
||||
section.contentKey !== LONG_TEXT_KEYS.content &&
|
||||
!HIDDEN_DETAIL_SECTION_KEYS.includes(section.contentKey)
|
||||
);
|
||||
};
|
||||
|
||||
@@ -99,7 +105,8 @@ const contentSections = computed(() => {
|
||||
return renderSections.value.filter(
|
||||
(section) =>
|
||||
section.contentKey !== LONG_TEXT_KEYS.title &&
|
||||
section.contentKey !== LONG_TEXT_KEYS.tag
|
||||
section.contentKey !== LONG_TEXT_KEYS.tag &&
|
||||
!HIDDEN_DETAIL_SECTION_KEYS.includes(section.contentKey)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -267,6 +274,7 @@ onUnload(() => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.long-answer-tag {
|
||||
display: inline-flex;
|
||||
|
||||
Reference in New Issue
Block a user