@regenbio/regenbio-components-react 1.2.21 → 1.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/Test/index.d.ts +80 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { RequestOptionsType } from '@ant-design/pro-utils';
|
|
2
|
+
import type { SelectProps } from 'antd';
|
|
3
|
+
import type { LabeledValue } from 'antd/lib/select';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export type KeyLabel = Partial<LabeledValue> & RequestOptionsType;
|
|
6
|
+
/** 用户扩展数据后的值类型 */
|
|
7
|
+
export type DataValueType<T> = KeyLabel & T;
|
|
8
|
+
/** 可能单选,可能多选 */
|
|
9
|
+
export type DataValuesType<T> = DataValueType<T> | DataValueType<T>[];
|
|
10
|
+
export interface SearchSelectProps<T = Record<string, any>> extends Omit<SelectProps<KeyLabel | KeyLabel[]>, 'options'> {
|
|
11
|
+
/** 防抖动时间 默认10 单位ms */
|
|
12
|
+
debounceTime?: number;
|
|
13
|
+
/** 自定义搜索方法, 返回搜索结果的 Promise */
|
|
14
|
+
request?: (params: {
|
|
15
|
+
query: string;
|
|
16
|
+
}) => Promise<DataValueType<T>[]>;
|
|
17
|
+
/** 自定义选项渲染 */
|
|
18
|
+
optionItemRender?: (item: DataValueType<T>) => React.ReactNode;
|
|
19
|
+
/** 指定组件中的值 */
|
|
20
|
+
value?: KeyLabel | KeyLabel[];
|
|
21
|
+
/** 指定默认选中的条目 */
|
|
22
|
+
defaultValue?: KeyLabel | KeyLabel[];
|
|
23
|
+
options?: RequestOptionsType[];
|
|
24
|
+
/**
|
|
25
|
+
* 样式
|
|
26
|
+
*
|
|
27
|
+
* @ignore
|
|
28
|
+
*/
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
/**
|
|
31
|
+
* ClassName 类名
|
|
32
|
+
*
|
|
33
|
+
* @ignore
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Placeholder 输入提示
|
|
38
|
+
*
|
|
39
|
+
* @default 请输入关键字搜索
|
|
40
|
+
*/
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 是否在输入框聚焦时触发搜索
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
searchOnFocus?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 选择完一个之后是否清空搜索项重新搜索
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
resetAfterSelect?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 自定义前缀
|
|
56
|
+
*
|
|
57
|
+
* @ignore
|
|
58
|
+
*/
|
|
59
|
+
prefixCls?: string;
|
|
60
|
+
/** 刷新数据 */
|
|
61
|
+
fetchData: (keyWord?: string) => void;
|
|
62
|
+
/** 清空数据 */
|
|
63
|
+
resetData: () => void;
|
|
64
|
+
/**
|
|
65
|
+
* 当搜索关键词发生变化时是否请求远程数据
|
|
66
|
+
*
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
fetchDataOnSearch?: boolean;
|
|
70
|
+
/** 默认搜索关键词 */
|
|
71
|
+
defaultSearchValue?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 在选择时保留选项的原始标签文本
|
|
74
|
+
* 当设置为 true 时,选中后回填的内容将使用选项的原始 label,而不是经过 optionItemRender 处理后的内容
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
preserveOriginalLabel?: boolean;
|
|
78
|
+
}
|
|
79
|
+
declare const _default: any;
|
|
80
|
+
export default _default;
|
package/build/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import RbDragTable from "./components/DragTable";
|
|
|
19
19
|
import { RbDragTableProps } from "./components/DragTable/type";
|
|
20
20
|
import RbUserSelector from "./components/UserSelector";
|
|
21
21
|
import { RbUserSelectorProps } from "./components/UserSelector/type";
|
|
22
|
+
import UserSelect from "./components/Test/index";
|
|
22
23
|
import DbUtil from "./services/utils/dbUtil";
|
|
23
24
|
import ObjectUtil from "./services/utils/objectUtil";
|
|
24
25
|
import EventUtil from "./services/utils/eventUtil";
|
|
@@ -54,7 +55,7 @@ export { RbHtmlRender };
|
|
|
54
55
|
export type { RbHtmlRenderProps };
|
|
55
56
|
export { RbDragTable };
|
|
56
57
|
export type { RbDragTableProps };
|
|
57
|
-
export { RbUserSelector };
|
|
58
|
+
export { RbUserSelector, UserSelect };
|
|
58
59
|
export type { RbUserSelectorProps };
|
|
59
60
|
export { DbUtil, ObjectUtil, EventUtil, StorageUtil, ResourceUtil, RenderUtil, StringUtil };
|
|
60
61
|
export { EventEnum, StorageEnum };
|