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

39 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: '#ffebee' },
{ tag: 2, description: '缺少', color: '#e3f2fd' },
{ tag: 3, description: '错读', color: '#fff3e0' },
{ tag: 4, description: '未录入', color: '#f5f5f5' }
]
},
playIconName: { type: String, value: 'sound-low' }
},
methods: {
noop() {},
onClose() {
const self = this as any
self.triggerEvent('close')
},
onPlay() {
const self = this as any
self.triggerEvent('play')
}
}
})