Files
simple-element-plus-template/src/components/common-sort/public.d.ts
Gary Fu aac8f09802 1. 控件优化
2. 增加monaco-editor、echarts等
2024-06-30 10:58:24 +08:00

18 lines
576 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export interface SortOption {
prop: string; // 排序字段如price该值会作为
labelKey?: string;// 国际化资源key首选该属性不存在才使用label
label?: string;
showIcon?: boolean; // 控制某些排序不显示图标
fixedValue?: 'ASC' | 'DESC'; // 固定排序模式
}
/**
* 排序结果
* key是排序字段来自SortOption的propvalue是排序方式
* 'ASC':升序 'DESC':降序 '':不生效
* 如 { "deptTime": "DESC", "price": "", "duration": "" }
*/
export interface SortProps {
[key: string]: 'ASC' | 'DESC' | ''
}