Files
miniprogram-1/miniprogram/components/score-modal/score-modal.ts
2025-12-19 17:16:24 +08:00

38 lines
1.2 KiB
TypeScript

Component({
properties: {
visible: { type: Boolean, value: false },
hasScoreInfo: { type: Boolean, value: false },
sentence: { type: Object, value: null },
totalScore: { type: Number, value: 0 },
accuracyScore: { type: Number, value: 0 },
completenessScore: { type: Number, value: 0 },
fluencyScore: { type: Number, value: 0 },
circleProgressStyle: { type: String, value: '' },
accuracyCircleStyle: { type: String, value: '' },
completenessCircleStyle: { type: String, value: '' },
fluencyCircleStyle: { type: String, value: '' },
wordScores: { type: Array, value: [] },
matchTagLegend: {
type: Array,
value: [
{ tag: 0, description: '匹配', color: '#ffffff' },
{ tag: 1, description: '新增', color: '#e6f0ff' },
{ tag: 2, description: '缺少', color: '#eef7ff' },
{ tag: 3, description: '错读', color: '#eaf3ff' },
{ tag: 4, description: '未录入', color: '#f5f7fa' }
]
},
playIconName: { type: String, value: 'sound-low' }
},
methods: {
onClose() {
const self = this as any
self.triggerEvent('close')
},
onPlay() {
const self = this as any
self.triggerEvent('play')
}
}
})