@zat-design/sisyphus-react 3.4.13-beta.9 → 3.5.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/es/ProForm/components/combination/ProNumberRange/index.js +28 -7
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +1 -2
- package/es/ProForm/utils/valueType.d.ts +0 -6
- package/es/ProForm/utils/valueType.js +30 -2
- package/es/ProLayout/index.js +6 -2
- package/es/ProLayout/propTypes.d.ts +4 -0
- package/es/ProTreeModal/index.js +10 -4
- package/lib/ProForm/components/combination/ProNumberRange/index.js +28 -7
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +1 -2
- package/lib/ProForm/utils/valueType.d.ts +0 -6
- package/lib/ProForm/utils/valueType.js +30 -2
- package/lib/ProLayout/index.js +6 -2
- package/lib/ProLayout/propTypes.d.ts +4 -0
- package/lib/ProTreeModal/index.js +10 -4
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ var formatAmount = tools.formatAmount,
|
|
|
17
17
|
formatPercent = tools.formatPercent,
|
|
18
18
|
formatPerMill = tools.formatPerMill;
|
|
19
19
|
var ProNumberRange = function ProNumberRange(props) {
|
|
20
|
+
var _valueProps, _valueProps2, _valueProps3, _valueProps4;
|
|
20
21
|
var _props$value = props.value,
|
|
21
22
|
value = _props$value === void 0 ? [] : _props$value,
|
|
22
23
|
_props$onChange = props.onChange,
|
|
@@ -134,8 +135,26 @@ var ProNumberRange = function ProNumberRange(props) {
|
|
|
134
135
|
}
|
|
135
136
|
};
|
|
136
137
|
break;
|
|
138
|
+
// 百分比
|
|
139
|
+
case 'percentage':
|
|
140
|
+
valueProps = {
|
|
141
|
+
min: 0,
|
|
142
|
+
max: 100,
|
|
143
|
+
step: 1
|
|
144
|
+
};
|
|
145
|
+
break;
|
|
146
|
+
// 千分比
|
|
147
|
+
case 'permillage':
|
|
148
|
+
valueProps = {
|
|
149
|
+
min: 0,
|
|
150
|
+
max: 1000,
|
|
151
|
+
step: 1
|
|
152
|
+
};
|
|
153
|
+
break;
|
|
137
154
|
default:
|
|
138
|
-
valueProps = {
|
|
155
|
+
valueProps = {
|
|
156
|
+
max: 999999999999
|
|
157
|
+
};
|
|
139
158
|
}
|
|
140
159
|
}
|
|
141
160
|
/**
|
|
@@ -157,15 +176,16 @@ var ProNumberRange = function ProNumberRange(props) {
|
|
|
157
176
|
className: "range-left",
|
|
158
177
|
value: (value === null || value === void 0 ? void 0 : value[0]) || range[0],
|
|
159
178
|
placeholder: "".concat(locale.ProForm.inputPlaceholder),
|
|
160
|
-
min: min,
|
|
161
|
-
max: (value === null || value === void 0 ? void 0 : value[1]) || max || range[1],
|
|
162
179
|
precision: precision,
|
|
163
180
|
disabled: getDisabled(disabled, 0),
|
|
164
181
|
onChange: function onChange(e) {
|
|
165
182
|
firstHandleChange(e);
|
|
166
183
|
},
|
|
167
184
|
addonBefore: addonBefore
|
|
168
|
-
}, valueProps),
|
|
185
|
+
}, valueProps), {}, {
|
|
186
|
+
min: min || ((_valueProps = valueProps) === null || _valueProps === void 0 ? void 0 : _valueProps.min),
|
|
187
|
+
max: (value === null || value === void 0 ? void 0 : value[1]) || range[1] || max || ((_valueProps2 = valueProps) === null || _valueProps2 === void 0 ? void 0 : _valueProps2.max)
|
|
188
|
+
}, childProps === null || childProps === void 0 ? void 0 : childProps[0])), _jsx(_Input, {
|
|
169
189
|
className: classnames({
|
|
170
190
|
'range-split': true,
|
|
171
191
|
'range-split-disabled': !!disabled
|
|
@@ -176,15 +196,16 @@ var ProNumberRange = function ProNumberRange(props) {
|
|
|
176
196
|
className: "range-right",
|
|
177
197
|
value: (value === null || value === void 0 ? void 0 : value[1]) || range[1],
|
|
178
198
|
placeholder: "".concat(locale.ProForm.inputPlaceholder),
|
|
179
|
-
min: (value === null || value === void 0 ? void 0 : value[0]) || min || range[0],
|
|
180
|
-
max: max,
|
|
181
199
|
precision: precision,
|
|
182
200
|
disabled: getDisabled(disabled, 1),
|
|
183
201
|
onChange: function onChange(e) {
|
|
184
202
|
lastHandleChange(e);
|
|
185
203
|
},
|
|
186
204
|
addonAfter: addonAfter
|
|
187
|
-
}, valueProps),
|
|
205
|
+
}, valueProps), {}, {
|
|
206
|
+
max: max || ((_valueProps3 = valueProps) === null || _valueProps3 === void 0 ? void 0 : _valueProps3.max),
|
|
207
|
+
min: (value === null || value === void 0 ? void 0 : value[0]) || range[0] || min || ((_valueProps4 = valueProps) === null || _valueProps4 === void 0 ? void 0 : _valueProps4.min)
|
|
208
|
+
}, childProps === null || childProps === void 0 ? void 0 : childProps[1]))]
|
|
188
209
|
});
|
|
189
210
|
};
|
|
190
211
|
export default ProNumberRange;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProFormOtherProps } from '../../../propsType';
|
|
3
|
-
export type ValueTypeEnum = 'percentage' | 'permillage' | 'thousandth';
|
|
4
3
|
export interface ProNumberRangeProps {
|
|
5
4
|
/**
|
|
6
5
|
* @description 组件的值,[最小值,最大值]
|
|
@@ -46,7 +45,7 @@ export interface ProNumberRangeProps {
|
|
|
46
45
|
* @description 值类型,回显时区分金额与百分比
|
|
47
46
|
* @default '-'
|
|
48
47
|
*/
|
|
49
|
-
valueType?:
|
|
48
|
+
valueType?: 'percentage' | 'permillage' | 'thousandth';
|
|
50
49
|
/**
|
|
51
50
|
* @description 空值查看时默认展示内容
|
|
52
51
|
* @default '-'
|
|
@@ -34,9 +34,6 @@ declare const _default: {
|
|
|
34
34
|
type: any;
|
|
35
35
|
valueType: any;
|
|
36
36
|
}) => {
|
|
37
|
-
normalize?: undefined;
|
|
38
|
-
getValueProps?: undefined;
|
|
39
|
-
} | {
|
|
40
37
|
normalize: (value: any) => any;
|
|
41
38
|
getValueProps: (value: any) => {
|
|
42
39
|
value: any;
|
|
@@ -47,9 +44,6 @@ declare const _default: {
|
|
|
47
44
|
type: any;
|
|
48
45
|
valueType: any;
|
|
49
46
|
}) => {
|
|
50
|
-
normalize?: undefined;
|
|
51
|
-
getValueProps?: undefined;
|
|
52
|
-
} | {
|
|
53
47
|
normalize: (value: any) => any;
|
|
54
48
|
getValueProps: (value: any) => {
|
|
55
49
|
value: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import Big from 'big.js';
|
|
3
|
+
import { isEqual } from 'lodash';
|
|
3
4
|
import { transforms } from '@zat-design/utils';
|
|
4
5
|
var transformDate = transforms.transformDate,
|
|
5
6
|
transformSwitch = transforms.transformSwitch;
|
|
@@ -13,8 +14,35 @@ var transformRatio = function transformRatio(_ref) {
|
|
|
13
14
|
precision = _ref$precision === void 0 ? 2 : _ref$precision,
|
|
14
15
|
valueType = _ref.valueType;
|
|
15
16
|
if (type === 'ProNumberRange' && ['permillage', 'percentage'].includes(valueType)) {
|
|
16
|
-
|
|
17
|
-
return {
|
|
17
|
+
var ref = null;
|
|
18
|
+
return {
|
|
19
|
+
normalize: function normalize(value) {
|
|
20
|
+
if (!value || !value.some(function (item) {
|
|
21
|
+
return item;
|
|
22
|
+
})) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
return [(value[0] || value[0] === 0) && Number.isFinite(value[0] - 0) ? Big(value[0] - 0).div(Math.pow(10, precision)).toNumber() : null, (value[1] || value[1] === 0) && Number.isFinite(value[1] - 0) ? Big(value[1] - 0).div(Math.pow(10, precision)).toNumber() : null];
|
|
26
|
+
},
|
|
27
|
+
getValueProps: function getValueProps(value) {
|
|
28
|
+
if (!value || !value.some(function (item) {
|
|
29
|
+
return item;
|
|
30
|
+
})) {
|
|
31
|
+
return {
|
|
32
|
+
value: []
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (isEqual(ref, value)) {
|
|
36
|
+
return {
|
|
37
|
+
value: [(value[0] || value[0] === 0) && Number.isFinite(value[0] - 0) ? Big(value[0] - 0).times(Math.pow(10, precision)).toNumber() : null, (value[1] || value[1] === 0) && Number.isFinite(value[1] - 0) ? Big(value[1] - 0).times(Math.pow(10, precision)).toNumber() : null]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
ref = value;
|
|
41
|
+
return {
|
|
42
|
+
value: [(value[0] || value[0] === 0) && Number.isFinite(value[0] - 0) ? Big(value[0] - 0).times(Math.pow(10, precision)).toNumber() : null, (value[1] || value[1] === 0) && Number.isFinite(value[1] - 0) ? Big(value[1] - 0).times(Math.pow(10, precision)).toNumber() : null]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
18
46
|
}
|
|
19
47
|
return {
|
|
20
48
|
normalize: function normalize(value) {
|
package/es/ProLayout/index.js
CHANGED
|
@@ -25,7 +25,8 @@ var ProLayout = function ProLayout(props) {
|
|
|
25
25
|
headerNotice = props.headerNotice,
|
|
26
26
|
noticeIn = props.notice,
|
|
27
27
|
dataSource = props.dataSource,
|
|
28
|
-
theme = props.theme
|
|
28
|
+
theme = props.theme,
|
|
29
|
+
onCollapsedChange = props.onCollapsedChange;
|
|
29
30
|
var _useSetState = useSetState({
|
|
30
31
|
notice: headerNotice || noticeIn,
|
|
31
32
|
menus: [],
|
|
@@ -86,7 +87,10 @@ var ProLayout = function ProLayout(props) {
|
|
|
86
87
|
dataSource: menus,
|
|
87
88
|
notice: notice,
|
|
88
89
|
collapsed: collapsed,
|
|
89
|
-
onToggle:
|
|
90
|
+
onToggle: function onToggle() {
|
|
91
|
+
toggle();
|
|
92
|
+
onCollapsedChange && onCollapsedChange(!collapsed);
|
|
93
|
+
}
|
|
90
94
|
})), _jsx("div", {
|
|
91
95
|
className: "pro-layout-content",
|
|
92
96
|
style: _objectSpread(_objectSpread({}, contentStyle), {}, {
|
|
@@ -51,6 +51,10 @@ export interface ProLayoutProps {
|
|
|
51
51
|
contentStyle?: CSSProperties;
|
|
52
52
|
waterMarkProps?: ProWaterMarkProps;
|
|
53
53
|
theme?: themeEnum;
|
|
54
|
+
/**
|
|
55
|
+
* 折叠回调事件
|
|
56
|
+
*/
|
|
57
|
+
onCollapsedChange?: (collapsed: any) => void;
|
|
54
58
|
[key: string]: any;
|
|
55
59
|
}
|
|
56
60
|
export interface ProLayoutStates {
|
package/es/ProTreeModal/index.js
CHANGED
|
@@ -259,10 +259,16 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
259
259
|
}
|
|
260
260
|
onChange === null || onChange === void 0 ? void 0 : onChange(values);
|
|
261
261
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
// fix: 当有 openChange 时候、点击确定应该由关闭 openChange 控制
|
|
263
|
+
if (!openChange || open === undefined) {
|
|
264
|
+
setState({
|
|
265
|
+
open: false
|
|
266
|
+
});
|
|
267
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
268
|
+
}
|
|
269
|
+
if (openChange && open !== undefined) {
|
|
270
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(true);
|
|
271
|
+
}
|
|
266
272
|
};
|
|
267
273
|
/**
|
|
268
274
|
* clear all checked
|
|
@@ -21,6 +21,7 @@ var formatAmount = _utils.tools.formatAmount,
|
|
|
21
21
|
formatPercent = _utils.tools.formatPercent,
|
|
22
22
|
formatPerMill = _utils.tools.formatPerMill;
|
|
23
23
|
var ProNumberRange = function ProNumberRange(props) {
|
|
24
|
+
var _valueProps, _valueProps2, _valueProps3, _valueProps4;
|
|
24
25
|
var _props$value = props.value,
|
|
25
26
|
value = _props$value === void 0 ? [] : _props$value,
|
|
26
27
|
_props$onChange = props.onChange,
|
|
@@ -138,8 +139,26 @@ var ProNumberRange = function ProNumberRange(props) {
|
|
|
138
139
|
}
|
|
139
140
|
};
|
|
140
141
|
break;
|
|
142
|
+
// 百分比
|
|
143
|
+
case 'percentage':
|
|
144
|
+
valueProps = {
|
|
145
|
+
min: 0,
|
|
146
|
+
max: 100,
|
|
147
|
+
step: 1
|
|
148
|
+
};
|
|
149
|
+
break;
|
|
150
|
+
// 千分比
|
|
151
|
+
case 'permillage':
|
|
152
|
+
valueProps = {
|
|
153
|
+
min: 0,
|
|
154
|
+
max: 1000,
|
|
155
|
+
step: 1
|
|
156
|
+
};
|
|
157
|
+
break;
|
|
141
158
|
default:
|
|
142
|
-
valueProps = {
|
|
159
|
+
valueProps = {
|
|
160
|
+
max: 999999999999
|
|
161
|
+
};
|
|
143
162
|
}
|
|
144
163
|
}
|
|
145
164
|
/**
|
|
@@ -161,15 +180,16 @@ var ProNumberRange = function ProNumberRange(props) {
|
|
|
161
180
|
className: "range-left",
|
|
162
181
|
value: (value === null || value === void 0 ? void 0 : value[0]) || range[0],
|
|
163
182
|
placeholder: "".concat(_locale.default.ProForm.inputPlaceholder),
|
|
164
|
-
min: min,
|
|
165
|
-
max: (value === null || value === void 0 ? void 0 : value[1]) || max || range[1],
|
|
166
183
|
precision: precision,
|
|
167
184
|
disabled: getDisabled(disabled, 0),
|
|
168
185
|
onChange: function onChange(e) {
|
|
169
186
|
firstHandleChange(e);
|
|
170
187
|
},
|
|
171
188
|
addonBefore: addonBefore
|
|
172
|
-
}, valueProps),
|
|
189
|
+
}, valueProps), {}, {
|
|
190
|
+
min: min || ((_valueProps = valueProps) === null || _valueProps === void 0 ? void 0 : _valueProps.min),
|
|
191
|
+
max: (value === null || value === void 0 ? void 0 : value[1]) || range[1] || max || ((_valueProps2 = valueProps) === null || _valueProps2 === void 0 ? void 0 : _valueProps2.max)
|
|
192
|
+
}, childProps === null || childProps === void 0 ? void 0 : childProps[0])), (0, _jsxRuntime.jsx)(_antd.Input, {
|
|
173
193
|
className: (0, _classnames.default)({
|
|
174
194
|
'range-split': true,
|
|
175
195
|
'range-split-disabled': !!disabled
|
|
@@ -180,15 +200,16 @@ var ProNumberRange = function ProNumberRange(props) {
|
|
|
180
200
|
className: "range-right",
|
|
181
201
|
value: (value === null || value === void 0 ? void 0 : value[1]) || range[1],
|
|
182
202
|
placeholder: "".concat(_locale.default.ProForm.inputPlaceholder),
|
|
183
|
-
min: (value === null || value === void 0 ? void 0 : value[0]) || min || range[0],
|
|
184
|
-
max: max,
|
|
185
203
|
precision: precision,
|
|
186
204
|
disabled: getDisabled(disabled, 1),
|
|
187
205
|
onChange: function onChange(e) {
|
|
188
206
|
lastHandleChange(e);
|
|
189
207
|
},
|
|
190
208
|
addonAfter: addonAfter
|
|
191
|
-
}, valueProps),
|
|
209
|
+
}, valueProps), {}, {
|
|
210
|
+
max: max || ((_valueProps3 = valueProps) === null || _valueProps3 === void 0 ? void 0 : _valueProps3.max),
|
|
211
|
+
min: (value === null || value === void 0 ? void 0 : value[0]) || range[0] || min || ((_valueProps4 = valueProps) === null || _valueProps4 === void 0 ? void 0 : _valueProps4.min)
|
|
212
|
+
}, childProps === null || childProps === void 0 ? void 0 : childProps[1]))]
|
|
192
213
|
});
|
|
193
214
|
};
|
|
194
215
|
var _default = exports.default = ProNumberRange;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProFormOtherProps } from '../../../propsType';
|
|
3
|
-
export type ValueTypeEnum = 'percentage' | 'permillage' | 'thousandth';
|
|
4
3
|
export interface ProNumberRangeProps {
|
|
5
4
|
/**
|
|
6
5
|
* @description 组件的值,[最小值,最大值]
|
|
@@ -46,7 +45,7 @@ export interface ProNumberRangeProps {
|
|
|
46
45
|
* @description 值类型,回显时区分金额与百分比
|
|
47
46
|
* @default '-'
|
|
48
47
|
*/
|
|
49
|
-
valueType?:
|
|
48
|
+
valueType?: 'percentage' | 'permillage' | 'thousandth';
|
|
50
49
|
/**
|
|
51
50
|
* @description 空值查看时默认展示内容
|
|
52
51
|
* @default '-'
|
|
@@ -34,9 +34,6 @@ declare const _default: {
|
|
|
34
34
|
type: any;
|
|
35
35
|
valueType: any;
|
|
36
36
|
}) => {
|
|
37
|
-
normalize?: undefined;
|
|
38
|
-
getValueProps?: undefined;
|
|
39
|
-
} | {
|
|
40
37
|
normalize: (value: any) => any;
|
|
41
38
|
getValueProps: (value: any) => {
|
|
42
39
|
value: any;
|
|
@@ -47,9 +44,6 @@ declare const _default: {
|
|
|
47
44
|
type: any;
|
|
48
45
|
valueType: any;
|
|
49
46
|
}) => {
|
|
50
|
-
normalize?: undefined;
|
|
51
|
-
getValueProps?: undefined;
|
|
52
|
-
} | {
|
|
53
47
|
normalize: (value: any) => any;
|
|
54
48
|
getValueProps: (value: any) => {
|
|
55
49
|
value: any;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _big = _interopRequireDefault(require("big.js"));
|
|
10
|
+
var _lodash = require("lodash");
|
|
10
11
|
var _utils = require("@zat-design/utils");
|
|
11
12
|
var transformDate = _utils.transforms.transformDate,
|
|
12
13
|
transformSwitch = _utils.transforms.transformSwitch;
|
|
@@ -20,8 +21,35 @@ var transformRatio = function transformRatio(_ref) {
|
|
|
20
21
|
precision = _ref$precision === void 0 ? 2 : _ref$precision,
|
|
21
22
|
valueType = _ref.valueType;
|
|
22
23
|
if (type === 'ProNumberRange' && ['permillage', 'percentage'].includes(valueType)) {
|
|
23
|
-
|
|
24
|
-
return {
|
|
24
|
+
var ref = null;
|
|
25
|
+
return {
|
|
26
|
+
normalize: function normalize(value) {
|
|
27
|
+
if (!value || !value.some(function (item) {
|
|
28
|
+
return item;
|
|
29
|
+
})) {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
return [(value[0] || value[0] === 0) && Number.isFinite(value[0] - 0) ? (0, _big.default)(value[0] - 0).div(Math.pow(10, precision)).toNumber() : null, (value[1] || value[1] === 0) && Number.isFinite(value[1] - 0) ? (0, _big.default)(value[1] - 0).div(Math.pow(10, precision)).toNumber() : null];
|
|
33
|
+
},
|
|
34
|
+
getValueProps: function getValueProps(value) {
|
|
35
|
+
if (!value || !value.some(function (item) {
|
|
36
|
+
return item;
|
|
37
|
+
})) {
|
|
38
|
+
return {
|
|
39
|
+
value: []
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if ((0, _lodash.isEqual)(ref, value)) {
|
|
43
|
+
return {
|
|
44
|
+
value: [(value[0] || value[0] === 0) && Number.isFinite(value[0] - 0) ? (0, _big.default)(value[0] - 0).times(Math.pow(10, precision)).toNumber() : null, (value[1] || value[1] === 0) && Number.isFinite(value[1] - 0) ? (0, _big.default)(value[1] - 0).times(Math.pow(10, precision)).toNumber() : null]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
ref = value;
|
|
48
|
+
return {
|
|
49
|
+
value: [(value[0] || value[0] === 0) && Number.isFinite(value[0] - 0) ? (0, _big.default)(value[0] - 0).times(Math.pow(10, precision)).toNumber() : null, (value[1] || value[1] === 0) && Number.isFinite(value[1] - 0) ? (0, _big.default)(value[1] - 0).times(Math.pow(10, precision)).toNumber() : null]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
25
53
|
}
|
|
26
54
|
return {
|
|
27
55
|
normalize: function normalize(value) {
|
package/lib/ProLayout/index.js
CHANGED
|
@@ -31,7 +31,8 @@ var ProLayout = function ProLayout(props) {
|
|
|
31
31
|
headerNotice = props.headerNotice,
|
|
32
32
|
noticeIn = props.notice,
|
|
33
33
|
dataSource = props.dataSource,
|
|
34
|
-
theme = props.theme
|
|
34
|
+
theme = props.theme,
|
|
35
|
+
onCollapsedChange = props.onCollapsedChange;
|
|
35
36
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
36
37
|
notice: headerNotice || noticeIn,
|
|
37
38
|
menus: [],
|
|
@@ -92,7 +93,10 @@ var ProLayout = function ProLayout(props) {
|
|
|
92
93
|
dataSource: menus,
|
|
93
94
|
notice: notice,
|
|
94
95
|
collapsed: collapsed,
|
|
95
|
-
onToggle:
|
|
96
|
+
onToggle: function onToggle() {
|
|
97
|
+
toggle();
|
|
98
|
+
onCollapsedChange && onCollapsedChange(!collapsed);
|
|
99
|
+
}
|
|
96
100
|
})), (0, _jsxRuntime.jsx)("div", {
|
|
97
101
|
className: "pro-layout-content",
|
|
98
102
|
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, contentStyle), {}, {
|
|
@@ -51,6 +51,10 @@ export interface ProLayoutProps {
|
|
|
51
51
|
contentStyle?: CSSProperties;
|
|
52
52
|
waterMarkProps?: ProWaterMarkProps;
|
|
53
53
|
theme?: themeEnum;
|
|
54
|
+
/**
|
|
55
|
+
* 折叠回调事件
|
|
56
|
+
*/
|
|
57
|
+
onCollapsedChange?: (collapsed: any) => void;
|
|
54
58
|
[key: string]: any;
|
|
55
59
|
}
|
|
56
60
|
export interface ProLayoutStates {
|
|
@@ -260,10 +260,16 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
260
260
|
}
|
|
261
261
|
onChange === null || onChange === void 0 ? void 0 : onChange(values);
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
263
|
+
// fix: 当有 openChange 时候、点击确定应该由关闭 openChange 控制
|
|
264
|
+
if (!openChange || open === undefined) {
|
|
265
|
+
setState({
|
|
266
|
+
open: false
|
|
267
|
+
});
|
|
268
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
269
|
+
}
|
|
270
|
+
if (openChange && open !== undefined) {
|
|
271
|
+
openChange === null || openChange === void 0 ? void 0 : openChange(true);
|
|
272
|
+
}
|
|
267
273
|
};
|
|
268
274
|
/**
|
|
269
275
|
* clear all checked
|