diff --git a/src/biz/SegmentCard.tsx b/src/biz/SegmentCard.tsx index 289627c..f21bea6 100644 --- a/src/biz/SegmentCard.tsx +++ b/src/biz/SegmentCard.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames' import {FaClipboardList} from 'react-icons/fa' import {PAGE_MAIN, PAGE_SETTINGS, SUMMARIZE_THRESHOLD, SUMMARIZE_TYPES} from '../const' import useTranslate from '../hooks/useTranslate' -import {BsDashSquare, BsPlusSquare, CgFileDocument, GrOverview, RiFileCopy2Line} from 'react-icons/all' +import {BsDashSquare, BsPlusSquare, CgFileDocument, FaQuestion, GrOverview, RiFileCopy2Line} from 'react-icons/all' import toast from 'react-hot-toast' import {getLastTime, getSummaryStr, isSummaryEmpty, parseStrTimeToSeconds} from '../util/biz_util' import {useInViewport} from 'ahooks' @@ -107,6 +107,13 @@ const Summarize = (props: {
{summary.content.summary}
} + {summary?.type === 'question' && (summary.content != null) && +
+ {summary.content.map((question: any, idx: number) =>
+

{question.q}

+
{question.a}
+
)} +
}
{segment.text.length < SUMMARIZE_THRESHOLD &&
文字过短,无法总结.
} @@ -189,6 +196,12 @@ const SegmentCard = (props: { })) }, [dispatch]) + const onSelQuestion = useCallback(() => { + dispatch(setTempData({ + curSummaryType: 'question' + })) + }, [dispatch]) + return
@@ -203,6 +216,7 @@ const SegmentCard = (props: { 总结 概览 要点 + 问题
}