@jiaozhiye/qm-design-react 1.1.0-beta.7 → 1.2.0-beta.1
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/_utils/cloneElement.d.ts +1 -1
- package/lib/_utils/dom.d.ts +2 -2
- package/lib/_utils/types.d.ts +1 -1
- package/lib/_utils/util.d.ts +1 -0
- package/lib/collapse/index.d.ts +3 -0
- package/lib/collapse/src/Content.d.ts +3 -0
- package/lib/collapse/src/_util/motion.less +13 -0
- package/lib/collapse/src/_util/motionUtil.d.ts +3 -0
- package/lib/collapse/src/collapse.d.ts +15 -0
- package/lib/collapse/style/index.less +24 -0
- package/lib/copy-to-clipboard/index.d.ts +3 -0
- package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +15 -0
- package/lib/copy-to-clipboard/style/index.less +12 -0
- package/lib/divider/src/divider.d.ts +2 -1
- package/lib/form/index.d.ts +1 -1
- package/lib/form/src/form-input.d.ts +2 -0
- package/lib/form/src/form-item-layout.d.ts +3 -0
- package/lib/form/src/form-rate.d.ts +10 -0
- package/lib/form/src/form.d.ts +7 -1
- package/lib/form/src/types.d.ts +27 -3
- package/lib/form/src/utils.d.ts +2 -1
- package/lib/form/style/index.less +13 -3
- package/lib/index.d.ts +8 -2
- package/lib/index.esm.js +2 -2
- package/lib/index.full.js +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/lang/en.d.ts +20 -0
- package/lib/locale/lang/en.js +22 -2
- package/lib/locale/lang/zh-cn.d.ts +20 -0
- package/lib/locale/lang/zh-cn.js +22 -2
- package/lib/search-helper/src/search-helper.d.ts +14 -8
- package/lib/search-helper/style/index.less +3 -2
- package/lib/style/index.css +391 -135
- package/lib/style/index.less +2 -0
- package/lib/style/index.min.css +1 -1
- package/lib/table/index.d.ts +1 -1
- package/lib/table/src/body/useMergeCell.d.ts +6 -0
- package/lib/table/src/clipboard/index.d.ts +7 -0
- package/lib/table/src/clipboard/setting.d.ts +8 -0
- package/lib/table/src/context/index.d.ts +2 -0
- package/lib/table/src/edit/InputNumber.d.ts +1 -0
- package/lib/table/src/filter-sql/index.d.ts +1 -1
- package/lib/table/src/hooks/useImperativeMethod.d.ts +4 -3
- package/lib/table/src/hooks/useTableCore.d.ts +19 -6
- package/lib/table/src/hooks/useTableEffect.d.ts +2 -1
- package/lib/table/src/hooks/useTableLayout.d.ts +2 -2
- package/lib/table/src/hooks/useTableMemo.d.ts +2 -0
- package/lib/table/src/hooks/useTableRef.d.ts +7 -1
- package/lib/table/src/import/setting.d.ts +1 -1
- package/lib/table/src/table/props.d.ts +21 -8
- package/lib/table/src/table/types.d.ts +43 -7
- package/lib/table/src/utils/index.d.ts +1 -1
- package/lib/table/style/body.less +13 -8
- package/lib/table/style/clipboard.less +25 -0
- package/lib/table/style/footer.less +5 -0
- package/lib/table/style/header.less +15 -3
- package/lib/table/style/index.less +1 -0
- package/lib/table/style/pager.less +5 -0
- package/lib/table/style/size.less +69 -69
- package/lib/table/style/table.less +37 -11
- package/lib/tree-helper/index.d.ts +3 -0
- package/lib/tree-helper/src/tree-helper.d.ts +22 -0
- package/lib/tree-helper/style/index.less +21 -0
- package/lib/tree-table-helper/src/tree-table-helper.d.ts +14 -8
- package/lib/tree-table-helper/style/index.less +2 -2
- package/lib/upload-file/src/upload-file.d.ts +1 -0
- package/package.json +12 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const cloneElement: (element: React.ReactNode, ...
|
|
2
|
+
export declare const cloneElement: (element: React.ReactNode, ...rest: any[]) => React.ReactElement | null;
|
package/lib/_utils/dom.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const getStyle: (element: HTMLElement, styleName: string) => Null
|
|
|
18
18
|
* @param {string} value css 属性的值
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
|
-
export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | string, value?: string
|
|
21
|
+
export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | string, value?: string) => void;
|
|
22
22
|
/**
|
|
23
23
|
* @description 移除元素样式
|
|
24
24
|
* @param {HTMLNode} element 元素节点
|
|
@@ -65,7 +65,7 @@ export declare const getParentNode: (el: HTMLElement, selector: string) => Nulla
|
|
|
65
65
|
* @param {HTMLNode} container 目标节点
|
|
66
66
|
* @returns boolean
|
|
67
67
|
*/
|
|
68
|
-
export declare const contains: (el: HTMLElement, container: HTMLElement) => boolean;
|
|
68
|
+
export declare const contains: (el: Element | HTMLElement | null, container: HTMLElement) => boolean;
|
|
69
69
|
/**
|
|
70
70
|
* @description 滚动到指定位置,动画效果
|
|
71
71
|
* @param {HTMLNode} el 带滚动条元素
|
package/lib/_utils/types.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare type ComponentSize = 'small' | 'middle' | 'large';
|
|
|
27
27
|
export declare type Locale = 'zh-cn' | 'en';
|
|
28
28
|
export declare type IDict = {
|
|
29
29
|
text: string;
|
|
30
|
-
value: string;
|
|
30
|
+
value: string | number;
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
children?: Array<IDict> | Nullable<undefined>;
|
|
33
33
|
};
|
package/lib/_utils/util.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const camelize: (input: string) => string;
|
|
|
19
19
|
export declare const isEmpty: (val: any) => boolean;
|
|
20
20
|
export declare const isValid: (val: string) => boolean;
|
|
21
21
|
export declare const getValueByPath: (obj: AnyObject<any>, paths?: string) => unknown;
|
|
22
|
+
export declare const deepClone: (target: object, map?: WeakMap<object, any>) => object;
|
|
22
23
|
export declare const getParserWidth: (val: number | string) => string;
|
|
23
24
|
export declare const flatJson: <T extends Record<string, any>>(jsonObject: T) => T;
|
|
24
25
|
export declare const getAuthValue: (code: string) => Record<string, any> | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type IProps = {
|
|
3
|
+
defaultActive?: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
forceRender?: boolean;
|
|
7
|
+
destroyOnClose?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
containerStyle?: React.CSSProperties;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare type QmCollapseProps = IProps;
|
|
14
|
+
declare const Collapse: React.FC<IProps>;
|
|
15
|
+
export default Collapse;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-06-01 20:04:55
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
@import '../src/_util/motion.less';
|
|
9
|
+
|
|
10
|
+
@prefix-collapse: ~'@{qm-prefix}-collapse';
|
|
11
|
+
|
|
12
|
+
.@{prefix-collapse} {
|
|
13
|
+
&-content {
|
|
14
|
+
padding: 0 2px;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
& > &-box {
|
|
18
|
+
margin-top: 8px;
|
|
19
|
+
}
|
|
20
|
+
&-hidden {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type IProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
showMessage?: boolean;
|
|
5
|
+
options?: {
|
|
6
|
+
debug?: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
format?: string;
|
|
9
|
+
};
|
|
10
|
+
onCopy?: (text: string, result: boolean) => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare type QmCopyToClipboardProps = IProps;
|
|
14
|
+
declare const CopyToClipboard: React.FC<IProps>;
|
|
15
|
+
export default CopyToClipboard;
|
|
@@ -6,9 +6,10 @@ declare type IProps = {
|
|
|
6
6
|
size?: ComponentSize;
|
|
7
7
|
extra?: JSXElement | string;
|
|
8
8
|
collapse?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
id?: string;
|
|
9
11
|
className?: string;
|
|
10
12
|
style?: CSSProperties;
|
|
11
|
-
id?: string;
|
|
12
13
|
onCollapseChange?: (collapse: boolean) => void;
|
|
13
14
|
};
|
|
14
15
|
export declare type QmDividerProps = IProps;
|
package/lib/form/index.d.ts
CHANGED
|
@@ -5,12 +5,14 @@ declare type IProps = {
|
|
|
5
5
|
};
|
|
6
6
|
declare type IInputProps<T = string> = IProps & {
|
|
7
7
|
value?: T;
|
|
8
|
+
onBlur?: (value: T) => void;
|
|
8
9
|
onChange?: (value: T) => void;
|
|
9
10
|
onValuesChange: (value: T) => void;
|
|
10
11
|
};
|
|
11
12
|
declare class VInput extends Component<IInputProps> {
|
|
12
13
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
13
14
|
triggerChange: (value: string) => void;
|
|
15
|
+
triggerBlur: (value: string) => void;
|
|
14
16
|
render(): React.ReactElement;
|
|
15
17
|
}
|
|
16
18
|
declare class FormInput extends Component<IProps> {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { IFormItem } from './types';
|
|
3
|
+
declare type IProps = {
|
|
4
|
+
option: IFormItem;
|
|
5
|
+
};
|
|
6
|
+
declare class FormRate extends Component<IProps> {
|
|
7
|
+
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
+
render(): React.ReactElement;
|
|
9
|
+
}
|
|
10
|
+
export default FormRate;
|
package/lib/form/src/form.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare type IState = {
|
|
|
15
15
|
collapse: boolean;
|
|
16
16
|
};
|
|
17
17
|
export declare type QmFormProps = IProps;
|
|
18
|
+
export declare type FormRef = QmForm;
|
|
18
19
|
declare class QmForm extends Component<IProps, IState> {
|
|
19
20
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
20
21
|
static propTypes: {
|
|
@@ -51,6 +52,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
51
52
|
onFieldsChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
52
53
|
onFinish: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
53
54
|
onFinishFailed: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
55
|
+
onReset: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
54
56
|
onCollapse: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
55
57
|
};
|
|
56
58
|
static defaultProps: {
|
|
@@ -68,6 +70,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
68
70
|
onFieldsChange: () => void;
|
|
69
71
|
onFinish: () => void;
|
|
70
72
|
onFinishFailed: () => void;
|
|
73
|
+
onReset: () => void;
|
|
71
74
|
onCollapse: () => void;
|
|
72
75
|
onFormItemsChange: () => void;
|
|
73
76
|
};
|
|
@@ -85,6 +88,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
85
88
|
get flattenItems(): IFormItem[];
|
|
86
89
|
get dividers(): IFormItem[];
|
|
87
90
|
get isFilterType(): boolean;
|
|
91
|
+
get isOnlyShow(): boolean;
|
|
88
92
|
get showDividerCollapse(): boolean;
|
|
89
93
|
get showFilterCollapse(): boolean | undefined;
|
|
90
94
|
componentDidMount(): void;
|
|
@@ -108,6 +112,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
108
112
|
getFormItems: import("memoize-one").MemoizedFn<(items: IFormItem[]) => IFormItem[]>;
|
|
109
113
|
getFlattenItems: import("memoize-one").MemoizedFn<(items: IFormItem[]) => IFormItem[]>;
|
|
110
114
|
setViewValue(fieldName: string, val?: string): void;
|
|
115
|
+
getViewValue(fieldName: string): string;
|
|
111
116
|
createInputFocus(): void;
|
|
112
117
|
getFormItemLabel(label: string | IFormItem): string;
|
|
113
118
|
getBlockDerivedItems(): Pick<IFormItem, "fieldName" | "label">[][];
|
|
@@ -128,6 +133,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
128
133
|
MULTIPLE_TREE_TABLE_HELPER(option: IFormItem): JSXElement;
|
|
129
134
|
CHECKBOX(option: IFormItem): JSXElement;
|
|
130
135
|
MULTIPLE_CHECKBOX(option: IFormItem): JSXElement;
|
|
136
|
+
RATE(option: IFormItem): JSXElement;
|
|
131
137
|
RADIO(option: IFormItem): JSXElement;
|
|
132
138
|
SWITCH(option: IFormItem): JSXElement;
|
|
133
139
|
TEXT_AREA(option: IFormItem): JSXElement;
|
|
@@ -170,7 +176,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
170
176
|
get_fields_other(fields?: string[]): IFormData;
|
|
171
177
|
SET_FIELDS_VALUE(values: IFormData): void;
|
|
172
178
|
GET_FIELDS_VALUE(fields?: string[]): IFormData;
|
|
173
|
-
GET_FORM_DATA(): Promise<any
|
|
179
|
+
GET_FORM_DATA(): Promise<[any, any]>;
|
|
174
180
|
SET_FIELDS_EXTRA(values: IExtraData): void;
|
|
175
181
|
GET_FIELDS_EXTRA(fields?: string[]): IExtraData;
|
|
176
182
|
GET_FIELDS_TOUCHED(fields?: string[]): boolean;
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { BuildInPlacements } from 'rc-trigger';
|
|
4
|
-
import type { IFetch, IColumn,
|
|
5
|
-
import type {
|
|
4
|
+
import type { IFetch, IColumn, IRowKey } from '../../table/src/table/types';
|
|
5
|
+
import type { CSSProperties, ComponentSize, JSXElement, ValueOf, AjaxResponse, IDict } from '../../_utils/types';
|
|
6
6
|
export declare const DEFAULT_COL = 4;
|
|
7
7
|
export declare const DEFAULT_ROWS = 1;
|
|
8
8
|
export declare const DEFAULT_LABEL_WIDTH = 80;
|
|
9
9
|
export declare const DEFAULT_COL_WIDTH = 300;
|
|
10
10
|
export declare const DEFAULT_TRUE_VALUE = "1";
|
|
11
11
|
export declare const DEFAULT_FALSE_VALUE = "0";
|
|
12
|
+
export declare type IRecord = Record<string, any>;
|
|
12
13
|
export declare type IFormLayout = 'horizontal' | 'vertical';
|
|
13
14
|
export declare type ILabelAlign = 'left' | 'right';
|
|
14
15
|
export declare type IFormType = 'default' | 'search' | 'onlyShow';
|
|
16
|
+
export declare type IValidateTrigger = 'onChange' | 'onBlur';
|
|
17
|
+
export declare type ICheckStrategy = 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
|
|
15
18
|
export declare type IFormItemType = 'DIVIDER' | 'INPUT' | 'TEXT_AREA' | 'RANGE_INPUT' | 'INPUT_NUMBER' | 'RANGE_INPUT_NUMBER' | 'CHECKBOX' | 'MULTIPLE_CHECKBOX' | 'RADIO' | 'SWITCH' | 'DATE' | 'RANGE_DATE' | 'TIME' | 'RANGE_TIME' | 'SELECT' | 'MULTIPLE_SELECT' | 'IMMEDIATE' | 'SEARCH_HELPER' | 'MULTIPLE_SEARCH_HELPER' | 'TREE_SELECT' | 'MULTIPLE_TREE_SELECT' | 'CASCADER' | 'MULTIPLE_CASCADER' | 'CITY_SELECT' | 'REGION_SELECT' | 'UPLOAD_FILE' | 'UPLOAD_IMG' | 'TINYMCE';
|
|
16
19
|
export declare const ARRAY_TYPE: IFormItemType[];
|
|
17
20
|
export declare const BUILT_IN_PLACEMENTS: BuildInPlacements;
|
|
@@ -72,6 +75,7 @@ export declare type IFormItem = {
|
|
|
72
75
|
noAuth?: boolean;
|
|
73
76
|
invisible?: boolean;
|
|
74
77
|
rules?: Record<string, any>[];
|
|
78
|
+
validateTrigger?: IValidateTrigger | IValidateTrigger[];
|
|
75
79
|
selfCol?: number;
|
|
76
80
|
offsetLeft?: number;
|
|
77
81
|
offsetRight?: number;
|
|
@@ -89,6 +93,7 @@ export declare type IFormItem = {
|
|
|
89
93
|
maxLength?: number;
|
|
90
94
|
password?: boolean;
|
|
91
95
|
toUpper?: boolean;
|
|
96
|
+
pattern?: RegExp;
|
|
92
97
|
secretType?: ISecretType;
|
|
93
98
|
step?: number;
|
|
94
99
|
min?: number;
|
|
@@ -113,10 +118,15 @@ export declare type IFormItem = {
|
|
|
113
118
|
hourStep?: number;
|
|
114
119
|
minuteStep?: number;
|
|
115
120
|
secondStep?: number;
|
|
121
|
+
allowHalf?: boolean;
|
|
122
|
+
tooltips?: string[];
|
|
123
|
+
count?: number;
|
|
116
124
|
filterable?: boolean;
|
|
117
125
|
collapseTags?: boolean;
|
|
118
126
|
maxTagTextLength?: number;
|
|
119
127
|
openPyt?: boolean;
|
|
128
|
+
checkStrategy?: ICheckStrategy;
|
|
129
|
+
changeOnSelect?: boolean;
|
|
120
130
|
hideHeader?: boolean;
|
|
121
131
|
onlySelect?: boolean;
|
|
122
132
|
columns?: IColumn[];
|
|
@@ -132,6 +142,9 @@ export declare type IFormItem = {
|
|
|
132
142
|
tinymceHeight?: number | string;
|
|
133
143
|
};
|
|
134
144
|
searchHelper?: {
|
|
145
|
+
name?: string;
|
|
146
|
+
getServerConfig?: IFetchFn;
|
|
147
|
+
createTableFetch?: (url: string) => IFetchFn;
|
|
135
148
|
filters?: IFormItem[];
|
|
136
149
|
table?: {
|
|
137
150
|
fetch?: IFetch;
|
|
@@ -143,6 +156,12 @@ export declare type IFormItem = {
|
|
|
143
156
|
fetch?: IFetch;
|
|
144
157
|
tableParamsMap?: (() => Record<string, string>) | Record<string, string>;
|
|
145
158
|
};
|
|
159
|
+
request?: {
|
|
160
|
+
fetchApi?: IFetchFn;
|
|
161
|
+
params?: IFetchParams;
|
|
162
|
+
formatter?: (params: IFetchParams) => IFetchParams;
|
|
163
|
+
dataKey?: string;
|
|
164
|
+
};
|
|
146
165
|
width?: number | string;
|
|
147
166
|
initialValue?: IFormData;
|
|
148
167
|
onlySelect?: boolean;
|
|
@@ -156,6 +175,7 @@ export declare type IFormItem = {
|
|
|
156
175
|
request?: {
|
|
157
176
|
fetchApi?: IFetchFn;
|
|
158
177
|
params?: IFetchParams;
|
|
178
|
+
formatter?: (params: IFetchParams) => IFetchParams;
|
|
159
179
|
dataKey?: string;
|
|
160
180
|
valueKey?: string;
|
|
161
181
|
textKey?: string;
|
|
@@ -166,6 +186,7 @@ export declare type IFormItem = {
|
|
|
166
186
|
withCredentials?: boolean;
|
|
167
187
|
params?: IFetchParams;
|
|
168
188
|
dataKey?: string;
|
|
189
|
+
fieldAliasMap?: (() => Record<string, string>) | Record<string, string>;
|
|
169
190
|
};
|
|
170
191
|
extra?: {
|
|
171
192
|
style?: CSSProperties;
|
|
@@ -182,7 +203,7 @@ export declare type IFormItem = {
|
|
|
182
203
|
onCollapse?: (collapse: boolean) => void;
|
|
183
204
|
};
|
|
184
205
|
render?: (options: IFormItem, instance: any) => JSXElement;
|
|
185
|
-
onChange?: (value: ValueOf<IFormData> | boolean, others?:
|
|
206
|
+
onChange?: (value: ValueOf<IFormData> | boolean, others?: any) => void;
|
|
186
207
|
onBlur?: (value: ValueOf<IFormData>) => void;
|
|
187
208
|
onEnter?: (value: ValueOf<IFormData>) => void;
|
|
188
209
|
};
|
|
@@ -211,6 +232,7 @@ export declare type IFormProps = {
|
|
|
211
232
|
onFieldsChange?: (changedFields: IFieldData[], allFields: IFieldData[]) => void;
|
|
212
233
|
onFinish?: (values: IFormData) => void;
|
|
213
234
|
onFinishFailed?: (errorFields: any) => void;
|
|
235
|
+
onReset?: () => void;
|
|
214
236
|
onCollapse?: (collapse: boolean) => void;
|
|
215
237
|
};
|
|
216
238
|
export declare const propTypes: {
|
|
@@ -247,6 +269,7 @@ export declare const propTypes: {
|
|
|
247
269
|
onFieldsChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
248
270
|
onFinish: PropTypes.Requireable<(...args: any[]) => any>;
|
|
249
271
|
onFinishFailed: PropTypes.Requireable<(...args: any[]) => any>;
|
|
272
|
+
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
250
273
|
onCollapse: PropTypes.Requireable<(...args: any[]) => any>;
|
|
251
274
|
};
|
|
252
275
|
export declare const defaultProps: {
|
|
@@ -264,6 +287,7 @@ export declare const defaultProps: {
|
|
|
264
287
|
onFieldsChange: () => void;
|
|
265
288
|
onFinish: () => void;
|
|
266
289
|
onFinishFailed: () => void;
|
|
290
|
+
onReset: () => void;
|
|
267
291
|
onCollapse: () => void;
|
|
268
292
|
onFormItemsChange: () => void;
|
|
269
293
|
};
|
package/lib/form/src/utils.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import dayjs, { Dayjs } from 'dayjs';
|
|
2
|
+
import type { IDict } from 'packages/_utils/types';
|
|
2
3
|
export declare const getDate: (dateString: string | undefined, format: string) => dayjs.Dayjs | null;
|
|
3
4
|
export declare const formatDate: (date: Dayjs | null, format: string) => string;
|
|
4
5
|
export declare const isEmptyValue: (value: unknown) => boolean;
|
|
5
|
-
export declare const deepMapList: (list: any[], valueKey: string, textKey: string) =>
|
|
6
|
+
export declare const deepMapList: (list: any[], valueKey: string, textKey: string) => IDict[];
|
|
6
7
|
export declare const deepFind: (arr: any[], mark: string) => any;
|
|
7
8
|
export declare const deepFindValues: <T>(arr: T[], str: string, depth?: number) => T[];
|
|
8
9
|
export declare const deepGetPath: (arr: any[], value: string) => string[] | undefined;
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
.extra-overflow-cut {
|
|
53
53
|
.text-overflow-cut();
|
|
54
54
|
}
|
|
55
|
+
// select
|
|
56
|
+
.ant-select {
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
55
59
|
// range input
|
|
56
60
|
.site-input-left {
|
|
57
61
|
border-right-width: 0;
|
|
@@ -78,11 +82,17 @@
|
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
}
|
|
85
|
+
// select-multiple
|
|
86
|
+
.ant-select-multiple {
|
|
87
|
+
.ant-select-selection-overflow-item-rest {
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
81
91
|
}
|
|
82
92
|
&__only-show {
|
|
83
|
-
.ant-form-item > .ant-form-item-control {
|
|
84
|
-
|
|
85
|
-
pointer-events: none
|
|
93
|
+
.ant-form-item > .ant-form-item-control .ant-col {
|
|
94
|
+
& > :not(.qm-upload-file):not(.qm-upload-img):not(.qm-tinymce) {
|
|
95
|
+
pointer-events: none;
|
|
86
96
|
}
|
|
87
97
|
}
|
|
88
98
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type { QmSpaceProps } from './space';
|
|
|
6
6
|
export { default as QmSpace } from './space';
|
|
7
7
|
export type { QmDividerProps } from './divider';
|
|
8
8
|
export { default as QmDivider } from './divider';
|
|
9
|
+
export type { QmCollapseProps } from './collapse';
|
|
10
|
+
export { default as QmCollapse } from './collapse';
|
|
9
11
|
export type { QmSplitProps, QmSplitPaneProps } from './split';
|
|
10
12
|
export { default as QmSplit } from './split';
|
|
11
13
|
export type { QmCountupProps } from './countup';
|
|
@@ -24,7 +26,7 @@ export type { QmDrawerProps } from './drawer';
|
|
|
24
26
|
export { default as QmDrawer } from './drawer';
|
|
25
27
|
export type { QmModalProps } from './modal';
|
|
26
28
|
export { default as QmModal } from './modal';
|
|
27
|
-
export type { QmFormProps, QmFormItem, QmFormItemType } from './form';
|
|
29
|
+
export type { QmFormRef, QmFormProps, QmFormItem, QmFormItemType } from './form';
|
|
28
30
|
export { default as QmForm } from './form';
|
|
29
31
|
export type { QmTinymceProps } from './tinymce';
|
|
30
32
|
export { default as QmTinymce } from './tinymce';
|
|
@@ -34,12 +36,16 @@ export type { QmUploadFileProps } from './upload-file';
|
|
|
34
36
|
export { default as QmUploadFile } from './upload-file';
|
|
35
37
|
export type { QmUploadImgProps } from './upload-img';
|
|
36
38
|
export { default as QmUploadImg } from './upload-img';
|
|
37
|
-
export type { QmTableProps, QmTableColumn } from './table';
|
|
39
|
+
export type { QmTableRef, QmTableProps, QmTableColumn } from './table';
|
|
38
40
|
export { default as QmTable } from './table';
|
|
39
41
|
export type { QmSearchHelperProps } from './search-helper';
|
|
40
42
|
export { default as QmSearchHelper } from './search-helper';
|
|
41
43
|
export type { QmTreeTableHelperProps } from './tree-table-helper';
|
|
42
44
|
export { default as QmTreeTableHelper } from './tree-table-helper';
|
|
45
|
+
export type { QmTreeHelperProps } from './tree-helper';
|
|
46
|
+
export { default as QmTreeHelper } from './tree-helper';
|
|
47
|
+
export type { QmCopyToClipboardProps } from './copy-to-clipboard';
|
|
48
|
+
export { default as QmCopyToClipboard } from './copy-to-clipboard';
|
|
43
49
|
export type { QmPrintProps } from './print';
|
|
44
50
|
export { default as QmPrint } from './print';
|
|
45
51
|
export { default as pinyin } from './pinyin';
|