+ {/* 当前状态 */}
+
+
+
+ {getDisplayText(selectedStudent.name)}
+
+
{selectedStudent.name}
+
+
+ 当前积分:
+ 0 ? 'success' : selectedStudent.score < 0 ? 'danger' : 'default'}
+ variant="light"
+ style={{ fontWeight: 'bold' }}
+ >
+ {selectedStudent.score > 0 ? `+${selectedStudent.score}` : selectedStudent.score}
+
+
+
+
+ {/* 快捷理由 */}
+ {groupedReasons.length > 0 && (
+
+
+
+ {groupedReasons.map(([category, items]) => (
+
+
+ {category}
+
+
+ {items.map((r) => (
+
+ ))}
+
+
+ ))}
+
+
+ )}
+
+ {/* 自定义分值 */}
+
+
+
+ {[-5, -3, -2, -1, 1, 2, 3, 5, 10].map((num) => (
+
+ ))}
+
+
+
+ setCustomScore(v as number)}
+ min={-99}
+ max={99}
+ step={1}
+ style={{ width: '140px' }}
+ placeholder="自定义分值"
+ />
+
+ 可在输入框微调特输入任意分值
+
+
+
+
+ {/* 理由内容 */}
+
+
+
setReasonContent('')} style={{ cursor: 'pointer' }} /> : undefined}
+ />
+
+
+ {/* 变动预览 */}
+ {customScore !== undefined && (
+
0 ? 'var(--td-success-color-1)' : customScore < 0 ? 'var(--td-error-color-1)' : 'var(--ss-bg-color)',
+ borderRadius: '8px',
+ border: `1px solid ${customScore > 0 ? 'var(--td-success-color-2)' : customScore < 0 ? 'var(--td-error-color-2)' : 'var(--ss-border-color)'}`,
+ marginTop: '4px'
+ }}
+ >
+
+ 变更预览:
+
+
+ {selectedStudent.name}{' '}
+ 0 ? 'var(--td-success-color)' : customScore < 0 ? 'var(--td-error-color)' : 'inherit' }}>
+ {customScore > 0 ? `+${customScore}` : customScore}
+ {' '}
+ 分
+
+ {reasonContent ? `理由:${reasonContent}` : '(无理由)'}
+
+
+
+ )}
+
+ )}
+