From 40767fb46bbea7cc5b1400dc6ccb5ed3c0083382 Mon Sep 17 00:00:00 2001 From: zhengpengju Date: Sun, 27 Mar 2022 21:59:11 +0800 Subject: [PATCH] fix --- admin/src/pages/examinationrules/components/ScoreSetter.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/admin/src/pages/examinationrules/components/ScoreSetter.tsx b/admin/src/pages/examinationrules/components/ScoreSetter.tsx index b848fb3..39c65ca 100644 --- a/admin/src/pages/examinationrules/components/ScoreSetter.tsx +++ b/admin/src/pages/examinationrules/components/ScoreSetter.tsx @@ -25,7 +25,7 @@ export type TableListItem = { // React.forwardRef 接受渲染函数作为参数。React 将使用 props 和 ref 作为参数来调用此函数。此函数应返回 React 节点。 const ScoreSetter = (props: any, ref: any) => { const {questionTypeValues, passScore: passScoreValue } = props - + const [flag, setFlag] = useState([]) // 分数变更标记 const [typeScore, setTypeScore] = useState(questionTypeValues.map((item: { code: number; score: number; score_harf: number; })=>({question_type:item.code, score: item.score, score_harf: item.score_harf}))) ; // 题型分数数组 [{"question_type": "0","score": "3","score_harf": "0"},] //const type = history.location.pathname === '/questionbank/attestation' ? 1 : 0 ; // 题库类型 @@ -109,7 +109,6 @@ const ScoreSetter = (props: any, ref: any) => { dataIndex: 'score_sum', //key: 'age', width: 80, - defaultValue:()=>{ return 123}, render: (_text: any, _: any, index: number) => { return <> {flag?.indexOf(index) === -1 ?