|
@@ -1,9 +1,9 @@
|
|
|
-import { Tag, Image, Icon } from 'vant'
|
|
|
-import { computed, defineComponent } from 'vue'
|
|
|
-import { QuestionType, QuestionTypeName } from '../../unit'
|
|
|
-import styles from './index.module.less'
|
|
|
-import iconPassCheck from '../../images/icon-pass-check.png'
|
|
|
-import UnitAudio from '../unit-audio'
|
|
|
+import { Tag, Image, Icon } from 'vant';
|
|
|
+import { computed, defineComponent } from 'vue';
|
|
|
+import { QuestionType, QuestionTypeName } from '../../unit';
|
|
|
+import styles from './index.module.less';
|
|
|
+import iconPassCheck from '../../images/icon-pass-check.png';
|
|
|
+import UnitAudio from '../unit-audio';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'answer-title',
|
|
@@ -38,30 +38,31 @@ export default defineComponent({
|
|
|
setup(props) {
|
|
|
const answerTypeName = computed(() => {
|
|
|
if (props.answerType === QuestionType.CHECKBOX) {
|
|
|
- return QuestionTypeName.CHECKBOX
|
|
|
+ return QuestionTypeName.CHECKBOX;
|
|
|
} else if (props.answerType === QuestionType.LINK) {
|
|
|
- return QuestionTypeName.LINK
|
|
|
+ return QuestionTypeName.LINK;
|
|
|
} else if (props.answerType === QuestionType.SORT) {
|
|
|
- return QuestionTypeName.SORT
|
|
|
+ return QuestionTypeName.SORT;
|
|
|
} else if (props.answerType === QuestionType.PLAY) {
|
|
|
- return QuestionTypeName.PLAY
|
|
|
+ return QuestionTypeName.PLAY;
|
|
|
}
|
|
|
- return QuestionTypeName.RADIO
|
|
|
- })
|
|
|
+ return QuestionTypeName.RADIO;
|
|
|
+ });
|
|
|
|
|
|
const mediaUrls = computed(() =>
|
|
|
props.extra.mediaUrls ? props.extra.mediaUrls.split(',') : ''
|
|
|
- )
|
|
|
+ );
|
|
|
return () => (
|
|
|
<>
|
|
|
<div class={styles.unitSubjectTitle}>
|
|
|
- {props.index}、{props.name} <span class={styles.unitScore}>({props.score || 0}分)</span>
|
|
|
+ {props.index}、{props.name}
|
|
|
+ {/* <span class={styles.unitScore}>({props.score || 0}分)</span> */}
|
|
|
<Tag
|
|
|
type="primary"
|
|
|
style={{
|
|
|
+ marginLeft: '8px',
|
|
|
lineHeight: '20px'
|
|
|
- }}
|
|
|
- >
|
|
|
+ }}>
|
|
|
{answerTypeName.value}
|
|
|
</Tag>
|
|
|
</div>
|
|
@@ -83,7 +84,10 @@ export default defineComponent({
|
|
|
{url.substr(-3) === 'mp3' ? (
|
|
|
<UnitAudio src={url} class={styles.valueAudio} />
|
|
|
) : (
|
|
|
- <Image class={[styles.unitTitleImg, 'answerTitleImg']} src={url} />
|
|
|
+ <Image
|
|
|
+ class={[styles.unitTitleImg, 'answerTitleImg']}
|
|
|
+ src={url}
|
|
|
+ />
|
|
|
)}
|
|
|
</>
|
|
|
)
|
|
@@ -93,6 +97,6 @@ export default defineComponent({
|
|
|
''
|
|
|
)}
|
|
|
</>
|
|
|
- )
|
|
|
+ );
|
|
|
}
|
|
|
-})
|
|
|
+});
|