This commit is contained in:
SunWuyuan
2025-03-16 10:28:44 +08:00
parent ec9f355f1b
commit cee730c17a
+2 -2
View File
@@ -365,8 +365,8 @@ export default {
sortStudentsByPinyin() { sortStudentsByPinyin() {
const newList = [...this.modelValue.list].sort((a, b) => { const newList = [...this.modelValue.list].sort((a, b) => {
const pinyinA = pinyin(a, { toneType: "none" }); const pinyinA = pinyin(a, { toneType: "none" ,mode: 'surname'});
const pinyinB = pinyin(b, { toneType: "none" }); const pinyinB = pinyin(b, { toneType: "none",mode: 'surname' });
return pinyinA.localeCompare(pinyinB); return pinyinA.localeCompare(pinyinB);
}); });