File tree Expand file tree Collapse file tree
assets/images/WenTianPavilion Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -491,8 +491,26 @@ class QAController {
491491 Array . from ( this . optionsContainer . children ) . forEach ( child => {
492492 if ( child . dataset . id === question . answer ) {
493493 child . style . backgroundColor = '#e0ffe0' ;
494+ // 添加正确图标
495+ const rightIcon = document . createElement ( 'img' ) ;
496+ rightIcon . src = '../assets/images/WenTianPavilion/right.svg' ;
497+ rightIcon . alt = 'correct' ;
498+ rightIcon . style . width = '2rem' ;
499+ rightIcon . style . height = '2rem' ;
500+ rightIcon . style . marginLeft = '1rem' ;
501+ rightIcon . style . verticalAlign = 'middle' ;
502+ child . appendChild ( rightIcon ) ;
494503 } else if ( child . classList . contains ( 'selected' ) && ! correct ) {
495504 child . style . backgroundColor = '#ffe0e0' ;
505+ // 添加错误图标
506+ const errorIcon = document . createElement ( 'img' ) ;
507+ errorIcon . src = '../assets/images/WenTianPavilion/error.svg' ;
508+ errorIcon . alt = 'error' ;
509+ errorIcon . style . width = '2rem' ;
510+ errorIcon . style . height = '2rem' ;
511+ errorIcon . style . marginLeft = '1rem' ;
512+ errorIcon . style . verticalAlign = 'middle' ;
513+ child . appendChild ( errorIcon ) ;
496514 }
497515 } ) ;
498516 }
You can’t perform that action at this time.
0 commit comments