@spacego/fe-components 0.2.3 → 0.3.0
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/lib/fe-form/fe-form-select/index.js +26 -30
- package/lib/fe-layouts/auth-layout/index.js +4 -4
- package/lib/fe-layouts/basics-layout/index.js +5 -3
- package/lib/fe-layouts/layout.js +25 -23
- package/lib/fe-table/fe-edit-table-cell/index.js +4 -4
- package/lib/fe-table/fe-normal-table/index.js +3 -3
- package/lib/fe-table/fe-table-link/index.js +3 -3
- package/lib/fe-table/fe-table-toolbar/index.js +4 -4
- package/lib/fe-table/use-table/index.js +3 -3
- package/lib/index.css +1 -1
- package/lib/index.js +165 -163
- package/lib/node_modules/.pnpm/@rc-component_pagination@1.2.0_nnrd3gsncyragczmpvfhocinkq/node_modules/@rc-component/pagination/es/locale/zh_CN.js +18 -0
- package/lib/node_modules/.pnpm/@rc-component_picker@1.9.0_xrdeekns7he6t7xjrt27lnhvge/node_modules/@rc-component/picker/es/locale/common.js +9 -0
- package/lib/node_modules/.pnpm/@rc-component_picker@1.9.0_xrdeekns7he6t7xjrt27lnhvge/node_modules/@rc-component/picker/es/locale/zh_CN.js +78 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/calendar/locale/zh_CN.js +4 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/date-picker/locale/zh_CN.js +24 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/locale/zh_CN.js +146 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/time-picker/locale/zh_CN.js +7 -0
- package/lib/store/modules/layout-config.store.js +4 -4
- package/lib/store/modules/theme.store.js +4 -4
- package/lib/types/fe-auto-complete/auto-complete.d.ts +2 -0
- package/lib/types/fe-auto-complete/index.d.ts +3 -2
- package/lib/types/fe-button/button.d.ts +16 -0
- package/lib/types/fe-button/index.d.ts +3 -16
- package/lib/types/fe-cascader/cascader.d.ts +7 -0
- package/lib/types/fe-cascader/index.d.ts +3 -7
- package/lib/types/fe-checkbox/checkbox.d.ts +6 -0
- package/lib/types/fe-checkbox/index.d.ts +3 -6
- package/lib/types/fe-checkbox-group/checkbox-group.d.ts +5 -0
- package/lib/types/fe-checkbox-group/index.d.ts +3 -5
- package/lib/types/fe-date-picker/date-picker.d.ts +3 -0
- package/lib/types/fe-date-picker/index.d.ts +3 -3
- package/lib/types/fe-description-render/description-render.d.ts +31 -0
- package/lib/types/fe-description-render/index.d.ts +8 -31
- package/lib/types/fe-descriptions/descriptions.d.ts +2 -0
- package/lib/types/fe-descriptions/index.d.ts +3 -2
- package/lib/types/fe-empty/empty.d.ts +2 -0
- package/lib/types/fe-empty/index.d.ts +3 -2
- package/lib/types/fe-error-block/error-block.d.ts +6 -0
- package/lib/types/fe-error-block/index.d.ts +3 -6
- package/lib/types/fe-form/fe-form/form.d.ts +354 -0
- package/lib/types/fe-form/fe-form/index.d.ts +3 -354
- package/lib/types/fe-form/fe-form-auto-complete/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-btn-group/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-cascader/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-checkbox-group/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-date-picker/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-date-range-picker/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-input/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-input-input/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-input-number/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-item/form-item.d.ts +66 -0
- package/lib/types/fe-form/fe-form-item/index.d.ts +3 -66
- package/lib/types/fe-form/fe-form-label/form-label.d.ts +43 -0
- package/lib/types/fe-form/fe-form-label/index.d.ts +3 -43
- package/lib/types/fe-form/fe-form-radio/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-render/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-rich-text/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-select/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-switch/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-text/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-text-area/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-time-picker/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-upload/index.d.ts +1 -1
- package/lib/types/fe-form/index.d.ts +4 -4
- package/lib/types/fe-form/utils/index.d.ts +1 -1
- package/lib/types/fe-input/index.d.ts +3 -12
- package/lib/types/fe-input/input.d.ts +12 -0
- package/lib/types/fe-input-number/index.d.ts +3 -2
- package/lib/types/fe-input-number/input-number.d.ts +2 -0
- package/lib/types/fe-link/index.d.ts +3 -6
- package/lib/types/fe-link/link.d.ts +6 -0
- package/lib/types/fe-loading/index.d.ts +1 -1
- package/lib/types/fe-map/index.d.ts +3 -73
- package/lib/types/fe-map/map.d.ts +73 -0
- package/lib/types/fe-modal/index.d.ts +3 -20
- package/lib/types/fe-modal/modal.d.ts +20 -0
- package/lib/types/fe-pagination/index.d.ts +3 -2
- package/lib/types/fe-pagination/pagination.d.ts +2 -0
- package/lib/types/fe-panel/index.d.ts +3 -61
- package/lib/types/fe-panel/panel-toolbar.d.ts +1 -1
- package/lib/types/fe-panel/panel.d.ts +61 -0
- package/lib/types/fe-permission/index.d.ts +3 -10
- package/lib/types/fe-permission/permission.d.ts +10 -0
- package/lib/types/fe-permission-provider/index.d.ts +3 -8
- package/lib/types/fe-permission-provider/permission-provider.d.ts +8 -0
- package/lib/types/fe-radio/index.d.ts +3 -2
- package/lib/types/fe-radio/radio.d.ts +2 -0
- package/lib/types/fe-radio-group/index.d.ts +3 -2
- package/lib/types/fe-radio-group/radio-group.d.ts +2 -0
- package/lib/types/fe-rich-text/index.d.ts +3 -167
- package/lib/types/fe-rich-text/rich-text.d.ts +167 -0
- package/lib/types/fe-select/index.d.ts +3 -8
- package/lib/types/fe-select/select.d.ts +8 -0
- package/lib/types/fe-switch/index.d.ts +3 -2
- package/lib/types/fe-switch/switch.d.ts +2 -0
- package/lib/types/fe-table/fe-table-link/index.d.ts +3 -10
- package/lib/types/fe-table/fe-table-link/table-link.d.ts +10 -0
- package/lib/types/fe-table/fe-table-render/index.d.ts +3 -11
- package/lib/types/fe-table/fe-table-render/table-render.d.ts +11 -0
- package/lib/types/fe-table/fe-table-toolbar/index.d.ts +3 -16
- package/lib/types/fe-table/fe-table-toolbar/table-toolbar.d.ts +16 -0
- package/lib/types/fe-text-area/index.d.ts +3 -4
- package/lib/types/fe-text-area/text-area.d.ts +4 -0
- package/lib/types/fe-time-picker/index.d.ts +3 -3
- package/lib/types/fe-time-picker/time-picker.d.ts +3 -0
- package/lib/types/fe-upload/index.d.ts +3 -85
- package/lib/types/fe-upload/upload.d.ts +85 -0
- package/lib/types/fe-upload-atomic/index.d.ts +3 -2
- package/lib/types/fe-upload-atomic/upload-atomic.d.ts +2 -0
- package/lib/types/fe-upload-crop/index.d.ts +2 -2
- package/lib/types/hooks/index.d.ts +1 -0
- package/lib/types/hooks/{use-descriptions → use-descriptions.hook}/index.d.ts +1 -1
- package/lib/types/hooks/use-descriptions.hook/use-descriptions.d.ts +151 -0
- package/lib/types/hooks/use-form.hook/index.d.ts +3 -0
- package/lib/types/hooks/{use-form/index.d.ts → use-form.hook/use-form.d.ts} +1 -1
- package/lib/types/hooks/use-permission.hook/index.d.ts +10 -10
- package/lib/types/hooks/use-permission.hook/use-permission.d.ts +10 -0
- package/lib/types/index.d.ts +30 -1
- package/package.json +1 -1
- /package/lib/hooks/{use-form → use-form.hook}/index.js +0 -0
|
@@ -1,167 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export type Range = RangeStatic | null;
|
|
5
|
-
|
|
6
|
-
export interface FeRichTextRef {
|
|
7
|
-
focus: () => void;
|
|
8
|
-
blur: () => void;
|
|
9
|
-
getEditor: () => Quill | null;
|
|
10
|
-
getUnprivilegedEditor: () => UnprivilegedEditor | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface UnprivilegedEditor {
|
|
14
|
-
getLength(): number;
|
|
15
|
-
getText(index?: number, length?: number): string;
|
|
16
|
-
getHTML(): string;
|
|
17
|
-
getDisplayHTML(): string;
|
|
18
|
-
getBounds(index: number, length?: number): BoundsStatic;
|
|
19
|
-
getSelection(focus?: boolean): RangeStatic;
|
|
20
|
-
getContents(index?: number, length?: number): DeltaStatic;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
type uploadToolConfig = {
|
|
24
|
-
imageConfig?: any;
|
|
25
|
-
uploadFn: any;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export interface FeRichTextProps {
|
|
29
|
-
/**
|
|
30
|
-
* 编辑器的内容
|
|
31
|
-
*/
|
|
32
|
-
value?: Value;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* 非受控模式的默认值
|
|
36
|
-
*/
|
|
37
|
-
defaultValue?: Value;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 内容变化时的回调函数
|
|
41
|
-
*/
|
|
42
|
-
onChange?: (value: string, delta: DeltaStatic, source: Sources, editor: UnprivilegedEditor) => void;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* 选择变化时的回调函数
|
|
46
|
-
*/
|
|
47
|
-
onChangeSelection?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 编辑器获取焦点回调
|
|
51
|
-
*/
|
|
52
|
-
onFocus?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 编辑器失去焦点回调
|
|
56
|
-
*/
|
|
57
|
-
onBlur?: (previousSelection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 编辑器高度
|
|
61
|
-
*/
|
|
62
|
-
height?: number | string;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 是否只读
|
|
66
|
-
*/
|
|
67
|
-
readOnly?: boolean;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* 占位符文本
|
|
71
|
-
*/
|
|
72
|
-
placeholder?: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 编辑区域边界
|
|
76
|
-
*/
|
|
77
|
-
bounds?: string | HTMLElement;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 格式白名单
|
|
81
|
-
*/
|
|
82
|
-
formats?: string[];
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* 自定义模块配置
|
|
86
|
-
*/
|
|
87
|
-
modules?: Record<string, any>;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 自定义样式
|
|
91
|
-
*/
|
|
92
|
-
style?: CSSProperties;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 自定义类名
|
|
96
|
-
*/
|
|
97
|
-
className?: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* HTML ID
|
|
101
|
-
*/
|
|
102
|
-
id?: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Tab索引
|
|
106
|
-
*/
|
|
107
|
-
tabIndex?: number;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Tab键对应的空格数量
|
|
111
|
-
*/
|
|
112
|
-
tabSize?: number;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* 自定义主题
|
|
116
|
-
*/
|
|
117
|
-
theme?: 'snow' | 'bubble' | string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* 滚动容器
|
|
121
|
-
*/
|
|
122
|
-
scrollingContainer?: string | HTMLElement;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* 键盘事件
|
|
126
|
-
*/
|
|
127
|
-
onKeyPress?: React.KeyboardEventHandler;
|
|
128
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
129
|
-
onKeyUp?: React.KeyboardEventHandler;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* 保留空白符
|
|
133
|
-
*/
|
|
134
|
-
preserveWhitespace?: boolean;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* 自定义子元素
|
|
138
|
-
*/
|
|
139
|
-
children?: ReactElement;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* 上传配置
|
|
143
|
-
*/
|
|
144
|
-
uploadToolConfig?: uploadToolConfig;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Quill Delta格式类型
|
|
149
|
-
*/
|
|
150
|
-
export interface Delta {
|
|
151
|
-
ops?: {
|
|
152
|
-
insert?: any;
|
|
153
|
-
delete?: number;
|
|
154
|
-
retain?: number;
|
|
155
|
-
attributes?: Record<string, any>;
|
|
156
|
-
}[];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* 工具栏配置选项
|
|
161
|
-
*/
|
|
162
|
-
export interface ToolbarOptions {
|
|
163
|
-
container?: string | string[][] | HTMLElement;
|
|
164
|
-
handlers?: Record<string, any>;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
declare const FeRichText: React.FC<FeRichTextProps>;
|
|
1
|
+
import { FeRichTextProps, FeRichTextRef } from './rich-text.d';
|
|
2
|
+
declare const FeRichText: import('react').ForwardRefExoticComponent<FeRichTextProps & import('react').RefAttributes<FeRichTextRef>>;
|
|
3
|
+
export default FeRichText;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { default as Quill, BoundsStatic, DeltaStatic, RangeStatic, Sources } from 'quill';
|
|
2
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
3
|
+
export type Value = string | DeltaStatic;
|
|
4
|
+
export type Range = RangeStatic | null;
|
|
5
|
+
|
|
6
|
+
export interface FeRichTextRef {
|
|
7
|
+
focus: () => void;
|
|
8
|
+
blur: () => void;
|
|
9
|
+
getEditor: () => Quill | null;
|
|
10
|
+
getUnprivilegedEditor: () => UnprivilegedEditor | null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UnprivilegedEditor {
|
|
14
|
+
getLength(): number;
|
|
15
|
+
getText(index?: number, length?: number): string;
|
|
16
|
+
getHTML(): string;
|
|
17
|
+
getDisplayHTML(): string;
|
|
18
|
+
getBounds(index: number, length?: number): BoundsStatic;
|
|
19
|
+
getSelection(focus?: boolean): RangeStatic;
|
|
20
|
+
getContents(index?: number, length?: number): DeltaStatic;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type uploadToolConfig = {
|
|
24
|
+
imageConfig?: any;
|
|
25
|
+
uploadFn: any;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export interface FeRichTextProps {
|
|
29
|
+
/**
|
|
30
|
+
* 编辑器的内容
|
|
31
|
+
*/
|
|
32
|
+
value?: Value;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 非受控模式的默认值
|
|
36
|
+
*/
|
|
37
|
+
defaultValue?: Value;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 内容变化时的回调函数
|
|
41
|
+
*/
|
|
42
|
+
onChange?: (value: string, delta: DeltaStatic, source: Sources, editor: UnprivilegedEditor) => void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 选择变化时的回调函数
|
|
46
|
+
*/
|
|
47
|
+
onChangeSelection?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 编辑器获取焦点回调
|
|
51
|
+
*/
|
|
52
|
+
onFocus?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 编辑器失去焦点回调
|
|
56
|
+
*/
|
|
57
|
+
onBlur?: (previousSelection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 编辑器高度
|
|
61
|
+
*/
|
|
62
|
+
height?: number | string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 是否只读
|
|
66
|
+
*/
|
|
67
|
+
readOnly?: boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 占位符文本
|
|
71
|
+
*/
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 编辑区域边界
|
|
76
|
+
*/
|
|
77
|
+
bounds?: string | HTMLElement;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 格式白名单
|
|
81
|
+
*/
|
|
82
|
+
formats?: string[];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 自定义模块配置
|
|
86
|
+
*/
|
|
87
|
+
modules?: Record<string, any>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 自定义样式
|
|
91
|
+
*/
|
|
92
|
+
style?: CSSProperties;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 自定义类名
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* HTML ID
|
|
101
|
+
*/
|
|
102
|
+
id?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Tab索引
|
|
106
|
+
*/
|
|
107
|
+
tabIndex?: number;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Tab键对应的空格数量
|
|
111
|
+
*/
|
|
112
|
+
tabSize?: number;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* 自定义主题
|
|
116
|
+
*/
|
|
117
|
+
theme?: 'snow' | 'bubble' | string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 滚动容器
|
|
121
|
+
*/
|
|
122
|
+
scrollingContainer?: string | HTMLElement;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* 键盘事件
|
|
126
|
+
*/
|
|
127
|
+
onKeyPress?: React.KeyboardEventHandler;
|
|
128
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
129
|
+
onKeyUp?: React.KeyboardEventHandler;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 保留空白符
|
|
133
|
+
*/
|
|
134
|
+
preserveWhitespace?: boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 自定义子元素
|
|
138
|
+
*/
|
|
139
|
+
children?: ReactElement;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 上传配置
|
|
143
|
+
*/
|
|
144
|
+
uploadToolConfig?: uploadToolConfig;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Quill Delta格式类型
|
|
149
|
+
*/
|
|
150
|
+
export interface Delta {
|
|
151
|
+
ops?: {
|
|
152
|
+
insert?: any;
|
|
153
|
+
delete?: number;
|
|
154
|
+
retain?: number;
|
|
155
|
+
attributes?: Record<string, any>;
|
|
156
|
+
}[];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 工具栏配置选项
|
|
161
|
+
*/
|
|
162
|
+
export interface ToolbarOptions {
|
|
163
|
+
container?: string | string[][] | HTMLElement;
|
|
164
|
+
handlers?: Record<string, any>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare const FeRichText: React.FC<FeRichTextProps>;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @name minWidth 最小宽度
|
|
5
|
-
* @default `200px`
|
|
6
|
-
*/
|
|
7
|
-
minWidth?: string;
|
|
8
|
-
}
|
|
1
|
+
import { FeSelectProps } from './select.d';
|
|
2
|
+
declare const FeSelect: (props: FeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeSelect;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FeSwitchProps } from './switch.d';
|
|
2
|
+
declare const FeSwitch: (props: FeSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeSwitch;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export interface FeTableLinkProps<T> {
|
|
6
|
-
config: Array<TFeTableLinkConfig<T>>;
|
|
7
|
-
modal?: {
|
|
8
|
-
confirm: (config: { title?: string; content?: React.ReactNode; onOk?: () => void; onCancel?: () => void }) => void;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
1
|
+
import { FeTableLinkProps } from './table-link.d';
|
|
2
|
+
declare const FeTableLink: <T extends Record<string, any>>(props: FeTableLinkProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeTableLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IColumnsHandleConfig } from '../type/table.d';
|
|
3
|
+
export type TFeTableLinkConfig<T> = IColumnsHandleConfig & { record: T; index: number };
|
|
4
|
+
|
|
5
|
+
export interface FeTableLinkProps<T> {
|
|
6
|
+
config: Array<TFeTableLinkConfig<T>>;
|
|
7
|
+
modal?: {
|
|
8
|
+
confirm: (config: { title?: string; content?: React.ReactNode; onOk?: () => void; onCancel?: () => void }) => void;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
width: ITableColumns<DataType>['width'];
|
|
5
|
-
record: DataType;
|
|
6
|
-
column: ITableColumns<DataType>;
|
|
7
|
-
renderType: TRenderType;
|
|
8
|
-
renderParams: ITableColumns<DataType>['renderParams'];
|
|
9
|
-
tagRenderParams: ITableColumns<DataType>['tagRenderParams'];
|
|
10
|
-
thousandsParams?: ITableColumns<DataType>['thousandsParams'];
|
|
11
|
-
}
|
|
1
|
+
import { FeTableRenderProps } from './table-render.d';
|
|
2
|
+
declare const FeTableRender: <DataType extends Record<string, any>>({ value, width, record, column, renderType, renderParams, tagRenderParams, thousandsParams }: FeTableRenderProps<DataType>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeTableRender;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITableColumns, TRenderType } from '../type/table.d';
|
|
2
|
+
export interface FeTableRenderProps<DataType extends Record<string, any>> {
|
|
3
|
+
value: any;
|
|
4
|
+
width: ITableColumns<DataType>['width'];
|
|
5
|
+
record: DataType;
|
|
6
|
+
column: ITableColumns<DataType>;
|
|
7
|
+
renderType: TRenderType;
|
|
8
|
+
renderParams: ITableColumns<DataType>['renderParams'];
|
|
9
|
+
tagRenderParams: ITableColumns<DataType>['tagRenderParams'];
|
|
10
|
+
thousandsParams?: ITableColumns<DataType>['thousandsParams'];
|
|
11
|
+
}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
config: IToolBarBtnConfig[];
|
|
5
|
-
btnPermissionList?: string[];
|
|
6
|
-
modal?: {
|
|
7
|
-
confirm: (config: {
|
|
8
|
-
title?: string;
|
|
9
|
-
content?: React.ReactNode;
|
|
10
|
-
onOk?: () => void;
|
|
11
|
-
onCancel?: () => void;
|
|
12
|
-
}) => void;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare const FeTableToolbar: React.ForwardRefExoticComponent<FeTableToolbarProps>;
|
|
1
|
+
import { FeTableToolbarProps } from './table-toolbar.d';
|
|
2
|
+
declare const FeTableToolBar: (props: FeTableToolbarProps) => import("react/jsx-runtime").JSX.Element[];
|
|
3
|
+
export default FeTableToolBar;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IToolBarBtnConfig } from '../type/table.d';
|
|
3
|
+
export interface FeTableToolbarProps {
|
|
4
|
+
config: IToolBarBtnConfig[];
|
|
5
|
+
btnPermissionList?: string[];
|
|
6
|
+
modal?: {
|
|
7
|
+
confirm: (config: {
|
|
8
|
+
title?: string;
|
|
9
|
+
content?: React.ReactNode;
|
|
10
|
+
onOk?: () => void;
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
}) => void;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const FeTableToolbar: React.ForwardRefExoticComponent<FeTableToolbarProps>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface FeTextAreaProps extends TextAreaProps {}
|
|
1
|
+
import { FeTextAreaProps } from './text-area.d';
|
|
2
|
+
declare const FeTextArea: (props: FeTextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeTextArea;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FeTimePickerProps } from './time-picker.d';
|
|
2
|
+
declare const FeTimePicker: (props: FeTimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeTimePicker;
|
|
@@ -1,85 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { AcceptType } from './upload.constant';
|
|
5
|
-
export type TCropConfig = {
|
|
6
|
-
width?: number;
|
|
7
|
-
height?: number;
|
|
8
|
-
roate?: boolean;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export interface IFeUploadProps extends Omit<FeUploadAtomicProps, 'accept' | 'onChange' | 'customRequest'> {
|
|
12
|
-
/**
|
|
13
|
-
* @name 自定义样式类型
|
|
14
|
-
* @params render 手动画children样式
|
|
15
|
-
* @params default 方形+加号上传框 - 默认样式
|
|
16
|
-
* @params card 卡片样式,可拖动上传,身份证场景
|
|
17
|
-
* @params btn 单个按钮样式,文件列表场景
|
|
18
|
-
*/
|
|
19
|
-
customType?: 'render' | 'default' | 'card' | 'btn' | 'drag';
|
|
20
|
-
/**
|
|
21
|
-
* @name 拖拽框/上传按钮内文案
|
|
22
|
-
*/
|
|
23
|
-
title?: string | string[];
|
|
24
|
-
/**
|
|
25
|
-
* @name 上传的fileList
|
|
26
|
-
*
|
|
27
|
-
* 当maxCount === 1时,value可为string类型
|
|
28
|
-
*/
|
|
29
|
-
value?: string | UploadFile[];
|
|
30
|
-
/**
|
|
31
|
-
* @name 底部提示
|
|
32
|
-
*/
|
|
33
|
-
tips?: string;
|
|
34
|
-
/**
|
|
35
|
-
* @name 可上传文件大小,单位:B,默认20M(1024*1024*20)
|
|
36
|
-
*/
|
|
37
|
-
fileSize?: number;
|
|
38
|
-
/**
|
|
39
|
-
* @name 上传图片是否支持裁剪
|
|
40
|
-
* @param isOpen 打开、关闭
|
|
41
|
-
*/
|
|
42
|
-
isCropImage?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* @name 图片裁剪参数设置
|
|
45
|
-
*/
|
|
46
|
-
cropCofig?: cropConfig;
|
|
47
|
-
/**
|
|
48
|
-
* @name 上传的文件类型限制
|
|
49
|
-
*/
|
|
50
|
-
accept?: AcceptType | AcceptType[];
|
|
51
|
-
/**
|
|
52
|
-
* @name 自定义accept格式,枚举accept不满足需求时使用,customAccept优先级大于accept
|
|
53
|
-
* @description 可以是预定义的类型(如IMAGE, PDF)或自定义MIME类型字符串(如'image/jpeg,image/png')
|
|
54
|
-
*/
|
|
55
|
-
customAccept?: string;
|
|
56
|
-
/**
|
|
57
|
-
* @name 上传文件限制类型格式,用于提示
|
|
58
|
-
* @description 会自动拼接为`上传文件类型只能为${acceptDesc}格式`
|
|
59
|
-
*/
|
|
60
|
-
acceptDesc?: string;
|
|
61
|
-
/**
|
|
62
|
-
* @name 是否手动处理类型校验
|
|
63
|
-
* @description 默认会根据accept或customAccept自动校验,当isManualValieType为true时,需要手动处理类型校验
|
|
64
|
-
*/
|
|
65
|
-
isManualValieType?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* @name 是否手动处理预览
|
|
68
|
-
* @description 默认会根据fileList自动处理预览,当isManualPreview为true时,需要手动处理预览
|
|
69
|
-
*/
|
|
70
|
-
isManualPreview?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* @name 是否在上传失败时删除文件
|
|
73
|
-
*/
|
|
74
|
-
isRemoveOnError?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* @name 自定义上传回调
|
|
77
|
-
*/
|
|
78
|
-
customRequest?: (file: File) => Promise<any>;
|
|
79
|
-
/**
|
|
80
|
-
* @name onchange事件
|
|
81
|
-
* @param fileList fileList列表
|
|
82
|
-
* @param files antd返回的上传进度和list
|
|
83
|
-
*/
|
|
84
|
-
onChange?: (fileList: UploadFile[], files: UploadChangeParam<UploadFile>) => void;
|
|
85
|
-
}
|
|
1
|
+
import { IFeUploadProps } from './upload.d';
|
|
2
|
+
declare const FeUpload: (props: IFeUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeUpload;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { UploadFile } from 'antd';
|
|
2
|
+
import { UploadChangeParam } from 'antd/es/upload';
|
|
3
|
+
import { FeUploadAtomicProps } from '../fe-upload-atomic/upload-atomic.d';
|
|
4
|
+
import { AcceptType } from './upload.constant';
|
|
5
|
+
export type TCropConfig = {
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
roate?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export interface IFeUploadProps extends Omit<FeUploadAtomicProps, 'accept' | 'onChange' | 'customRequest'> {
|
|
12
|
+
/**
|
|
13
|
+
* @name 自定义样式类型
|
|
14
|
+
* @params render 手动画children样式
|
|
15
|
+
* @params default 方形+加号上传框 - 默认样式
|
|
16
|
+
* @params card 卡片样式,可拖动上传,身份证场景
|
|
17
|
+
* @params btn 单个按钮样式,文件列表场景
|
|
18
|
+
*/
|
|
19
|
+
customType?: 'render' | 'default' | 'card' | 'btn' | 'drag';
|
|
20
|
+
/**
|
|
21
|
+
* @name 拖拽框/上传按钮内文案
|
|
22
|
+
*/
|
|
23
|
+
title?: string | string[];
|
|
24
|
+
/**
|
|
25
|
+
* @name 上传的fileList
|
|
26
|
+
*
|
|
27
|
+
* 当maxCount === 1时,value可为string类型
|
|
28
|
+
*/
|
|
29
|
+
value?: string | UploadFile[];
|
|
30
|
+
/**
|
|
31
|
+
* @name 底部提示
|
|
32
|
+
*/
|
|
33
|
+
tips?: string;
|
|
34
|
+
/**
|
|
35
|
+
* @name 可上传文件大小,单位:B,默认20M(1024*1024*20)
|
|
36
|
+
*/
|
|
37
|
+
fileSize?: number;
|
|
38
|
+
/**
|
|
39
|
+
* @name 上传图片是否支持裁剪
|
|
40
|
+
* @param isOpen 打开、关闭
|
|
41
|
+
*/
|
|
42
|
+
isCropImage?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @name 图片裁剪参数设置
|
|
45
|
+
*/
|
|
46
|
+
cropCofig?: cropConfig;
|
|
47
|
+
/**
|
|
48
|
+
* @name 上传的文件类型限制
|
|
49
|
+
*/
|
|
50
|
+
accept?: AcceptType | AcceptType[];
|
|
51
|
+
/**
|
|
52
|
+
* @name 自定义accept格式,枚举accept不满足需求时使用,customAccept优先级大于accept
|
|
53
|
+
* @description 可以是预定义的类型(如IMAGE, PDF)或自定义MIME类型字符串(如'image/jpeg,image/png')
|
|
54
|
+
*/
|
|
55
|
+
customAccept?: string;
|
|
56
|
+
/**
|
|
57
|
+
* @name 上传文件限制类型格式,用于提示
|
|
58
|
+
* @description 会自动拼接为`上传文件类型只能为${acceptDesc}格式`
|
|
59
|
+
*/
|
|
60
|
+
acceptDesc?: string;
|
|
61
|
+
/**
|
|
62
|
+
* @name 是否手动处理类型校验
|
|
63
|
+
* @description 默认会根据accept或customAccept自动校验,当isManualValieType为true时,需要手动处理类型校验
|
|
64
|
+
*/
|
|
65
|
+
isManualValieType?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @name 是否手动处理预览
|
|
68
|
+
* @description 默认会根据fileList自动处理预览,当isManualPreview为true时,需要手动处理预览
|
|
69
|
+
*/
|
|
70
|
+
isManualPreview?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* @name 是否在上传失败时删除文件
|
|
73
|
+
*/
|
|
74
|
+
isRemoveOnError?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* @name 自定义上传回调
|
|
77
|
+
*/
|
|
78
|
+
customRequest?: (file: File) => Promise<any>;
|
|
79
|
+
/**
|
|
80
|
+
* @name onchange事件
|
|
81
|
+
* @param fileList fileList列表
|
|
82
|
+
* @param files antd返回的上传进度和list
|
|
83
|
+
*/
|
|
84
|
+
onChange?: (fileList: UploadFile[], files: UploadChangeParam<UploadFile>) => void;
|
|
85
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FeUploadAtomicProps } from './upload-atomic.d';
|
|
2
|
+
declare const FeUploadAtomic: (props: FeUploadAtomicProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeUploadAtomic;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RcFile } from 'antd/es/upload';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
|
-
import { TCropConfig } from '../fe-upload/
|
|
4
|
-
interface ICropRenderProps {
|
|
3
|
+
import { TCropConfig } from '../fe-upload/upload.d';
|
|
4
|
+
export interface ICropRenderProps {
|
|
5
5
|
file: RcFile;
|
|
6
6
|
onCrop?: (croppedImage: Blob) => void;
|
|
7
7
|
cropConfig?: TCropConfig;
|