import React, { useState } from 'react'; import router from 'umi/router'; import { Button, InputItem, TextareaItem } from 'antd-mobile'; import styles from './index.less'; const Index = ({ type = 3, no, total, title, analysis, rightAnswer }) => { const [isShowAnswer, setIsShowAnswer] = useState(false); const showAnswer = () => { setIsShowAnswer(true); }; const goSubmitAnalysis = () => { router.push('/exam/question/submit/analysis/0'); }; return (
{no}/{total}、{title}
{type === 3 && (
)} {(type === 4 || type === 6 || type === 8 || type === 9) && (
)}
{isShowAnswer && (
正确答案为:{rightAnswer}
题型解析:{analysis}
我要解析
)} {!isShowAnswer && (
)}
上一题
跳转到
下一题
); }; export default Index;