Skip to content

Commit

Permalink
feat(state): member field sort by display_name_pinyin default (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
minlovehua authored Dec 26, 2024
1 parent 5f4592d commit ab38639
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/grid/src/types/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface AIFieldConfig {
export interface AITableUserInfo {
uid?: string;
display_name?: string;
name?: string;
display_name_pinyin?: string;
avatar?: string;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/state/src/utils/field/model/member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class MemberField extends Field {
if (!userInfo) {
continue;
}
if (userInfo.name) {
names.push(userInfo.name);
if (userInfo.display_name_pinyin) {
names.push(userInfo.display_name_pinyin);
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/app/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1017,49 +1017,49 @@ export function getReferences(): AITableReferences {
member_01: {
uid: 'member_01',
display_name: 'admin',
name: 'admin',
display_name_pinyin: 'admin',
avatar: 'https://web.on-premises-alpha.pingcode.live/pc-avatar/c04446a4-bfcc-4a05-846c-e3241e1b68df_80x80.png'
},
member_02: {
uid: 'member_02',
display_name: 'member',
name: 'member',
display_name_pinyin: 'member',
avatar: ''
},
member_03: {
uid: 'member_03',
display_name: 'Maple13',
name: 'Maple13',
display_name_pinyin: 'Maple13',
avatar: ''
},
member_04: {
uid: 'member_04',
display_name: 'canvas',
name: 'canvas',
display_name_pinyin: 'canvas',
avatar: ''
},
member_05: {
uid: 'member_05',
display_name: '虾米',
name: 'xiami',
display_name_pinyin: 'xiami',
avatar: ''
},
member_06: {
uid: 'member_06',
display_name: 'html',
name: 'html',
display_name_pinyin: 'html',
avatar: ''
},
member_07: {
uid: 'member_07',
display_name: 'css',
name: 'css',
display_name_pinyin: 'css',
avatar: ''
},
member_08: {
uid: 'member_08',
display_name: 'Angular',
name: 'Angular',
display_name_pinyin: 'Angular',
avatar: ''
}
}
Expand Down

0 comments on commit ab38639

Please sign in to comment.