-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathconstant.ts
More file actions
31 lines (28 loc) · 834 Bytes
/
constant.ts
File metadata and controls
31 lines (28 loc) · 834 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
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 }],
},
]