11import { t } from '@/locales'
22
3-
43export const SORT_TYPES = {
54 CREATE_TIME_ASC : 'createTime-asc' ,
65 CREATE_TIME_DESC : 'createTime-desc' ,
76 NAME_ASC : 'name-asc' ,
87 NAME_DESC : 'name-desc' ,
9- CUSTOM : 'custom'
8+ CUSTOM : 'custom' ,
109} as const
1110
12- export type SortType = typeof SORT_TYPES [ keyof typeof SORT_TYPES ]
11+ export type SortType = ( typeof SORT_TYPES ) [ keyof typeof SORT_TYPES ]
1312
1413export const SORT_MENU_CONFIG = [
1514 {
16- title : 'time' ,
15+ title : 'time' ,
1716 items : [
18- { label : t ( 'components.folder.ascTime' , '按创建时间升序' ) , value : SORT_TYPES . CREATE_TIME_ASC } ,
19- { label : t ( 'components.folder.descTime' , '按创建时间降序' ) , value : SORT_TYPES . CREATE_TIME_DESC } ,
20- ]
17+ { label : t ( 'components.folder.ascTime' ) , value : SORT_TYPES . CREATE_TIME_ASC } ,
18+ { label : t ( 'components.folder.descTime' ) , value : SORT_TYPES . CREATE_TIME_DESC } ,
19+ ] ,
2120 } ,
2221 {
2322 title : 'name' ,
2423 items : [
25- { label : t ( 'components.folder.ascName' , '按名称升序' ) , value : SORT_TYPES . NAME_ASC } ,
26- { label : t ( 'components.folder.descName' , '按名称降序' ) , value : SORT_TYPES . NAME_DESC } ,
27- ]
24+ { label : t ( 'components.folder.ascName' ) , value : SORT_TYPES . NAME_ASC } ,
25+ { label : t ( 'components.folder.descName' ) , value : SORT_TYPES . NAME_DESC } ,
26+ ] ,
2827 } ,
2928 {
30- items : [
31- { label : t ( 'components.folder.custom' , '按用户拖拽排序' ) , value : SORT_TYPES . CUSTOM } ,
32- ]
33- }
34- ]
29+ items : [ { label : t ( 'components.folder.sortDrop' ) , value : SORT_TYPES . CUSTOM } ] ,
30+ } ,
31+ ]
0 commit comments