-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathconstant.ts
More file actions
34 lines (30 loc) · 953 Bytes
/
constant.ts
File metadata and controls
34 lines (30 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { t } from '@/locales'
export const SORT_TYPES = {
CREATE_TIME_ASC: 'createTime-asc',
CREATE_TIME_DESC: 'createTime-desc',
NAME_ASC: 'name-asc',
NAME_DESC: 'name-desc',
CUSTOM: 'custom'
} as const
export type SortType = typeof SORT_TYPES[keyof typeof SORT_TYPES]
export const SORT_MENU_CONFIG = [
{
title: 'time',
items: [
{ label: t('components.folder.ascTime', '按创建时间升序'), value: SORT_TYPES.CREATE_TIME_ASC},
{ label: t('components.folder.descTime', '按创建时间降序'), value: SORT_TYPES.CREATE_TIME_DESC },
]
},
{
title: 'name',
items: [
{ label: t('components.folder.ascName', '按名称升序'), value: SORT_TYPES.NAME_ASC },
{ label: t('components.folder.descName', '按名称降序'), value: SORT_TYPES.NAME_DESC },
]
},
{
items: [
{ label: t('components.folder.custom', '按用户拖拽排序'), value: SORT_TYPES.CUSTOM },
]
}
]