import { defineComponent } from 'vue' import styles from './index.module.less' import iconError from '../../images/icon-error.png' import iconSuccess from '../../images/icon-success.png' import iconAnalysis from '../../images/icon-analysis.png' import { Icon } from 'vant' // 答案解析 export default defineComponent({ name: 'answer-analysis', props: { topic: { // 状态 type: Boolean, default: true }, userResult: { tyep: Boolean, default: false }, answerAnalysis: { type: String, default: '' } }, setup(props) { return () => (
{props.topic ? ( <> {props.userResult ? (
回答正确
) : (
回答错误
)} ) : ( '' //
// 正确答案: A //
)} {props.answerAnalysis && ( <>
答案解析
{props.answerAnalysis}
)}
) } })