@zat-design/sisyphus-react 4.0.0 → 4.0.2
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/README.md +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -5
- package/es/ProEditTable/components/RenderField/index.js +77 -13
- package/es/ProEditTable/index.js +0 -5
- package/es/ProEditTable/style/index.less +2 -2
- package/es/ProEditTable/utils/index.js +6 -5
- package/es/ProForm/components/combination/Group/style/index.less +13 -12
- package/es/ProForm/index.js +4 -1
- package/es/ProForm/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +14 -16
- package/es/ProLayout/index.d.ts +0 -11
- package/es/ProLayout/index.js +4 -13
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProSelect/index.js +33 -32
- package/es/ProSelect/propsType.d.ts +0 -12
- package/es/ProTree/components/ProTreeSelect/index.js +5 -3
- package/es/ProTreeModal/style/index.less +1 -1
- package/es/style/theme/antd.less +1 -1
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +8 -4
- package/lib/ProEditTable/components/RenderField/index.js +76 -12
- package/lib/ProEditTable/index.js +0 -5
- package/lib/ProEditTable/style/index.less +2 -2
- package/lib/ProEditTable/utils/index.js +6 -5
- package/lib/ProForm/components/combination/Group/style/index.less +13 -12
- package/lib/ProForm/index.js +4 -1
- package/lib/ProForm/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +14 -16
- package/lib/ProLayout/index.d.ts +0 -11
- package/lib/ProLayout/index.js +4 -13
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProSelect/index.js +31 -30
- package/lib/ProSelect/propsType.d.ts +0 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +5 -3
- package/lib/ProTreeModal/style/index.less +1 -1
- package/lib/style/theme/antd.less +1 -1
- package/package.json +5 -8
- package/babel.config.js.backup +0 -13
- package/package.json.backup-antd5 +0 -159
- /package/es/ProSelect/{index.less → style/index.less} +0 -0
- /package/lib/ProSelect/{index.less → style/index.less} +0 -0
|
@@ -47,7 +47,7 @@ var FoldMenu = props => {
|
|
|
47
47
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
48
48
|
className: "pro-layout-menu-fold-list",
|
|
49
49
|
style: _objectSpread({}, style),
|
|
50
|
-
children: menus.map((item, index) => {
|
|
50
|
+
children: menus.filter(item => !item.hideInMenu).map((item, index) => {
|
|
51
51
|
var _url$split;
|
|
52
52
|
var id = item.id,
|
|
53
53
|
url = item.url,
|
|
@@ -55,14 +55,8 @@ var FoldMenu = props => {
|
|
|
55
55
|
icon = item.icon,
|
|
56
56
|
imgUrl = item.imgUrl,
|
|
57
57
|
imgActiveUrl = item.imgActiveUrl,
|
|
58
|
-
hideInMenu = item.hideInMenu,
|
|
59
58
|
children = item.children;
|
|
60
59
|
var toPath = item.redirectUrl || item.url;
|
|
61
|
-
|
|
62
|
-
// 隐藏菜单
|
|
63
|
-
if (hideInMenu) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
60
|
var selectedMenu = (0, _utils.getUrlParams)('activeMenu');
|
|
67
61
|
var pathToMatch = selectedPath || selectedMenu || window.location.pathname;
|
|
68
62
|
|
|
@@ -94,7 +88,7 @@ var FoldMenu = props => {
|
|
|
94
88
|
children: name
|
|
95
89
|
})]
|
|
96
90
|
})
|
|
97
|
-
}
|
|
91
|
+
});
|
|
98
92
|
return hasChildrenMenu ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Popover, {
|
|
99
93
|
mouseEnterDelay: 0,
|
|
100
94
|
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SideMenu.default, {
|
|
@@ -104,10 +98,14 @@ var FoldMenu = props => {
|
|
|
104
98
|
onMenuClick: onMenuClick
|
|
105
99
|
}),
|
|
106
100
|
color: "#fff",
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
classNames: {
|
|
102
|
+
root: noticeCls
|
|
103
|
+
},
|
|
104
|
+
styles: {
|
|
105
|
+
content: {
|
|
106
|
+
marginTop: headerHeight - 48,
|
|
107
|
+
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0)}px)`
|
|
108
|
+
}
|
|
111
109
|
},
|
|
112
110
|
placement: "rightTop",
|
|
113
111
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -151,9 +149,9 @@ var FoldMenu = props => {
|
|
|
151
149
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
152
150
|
to: toPath,
|
|
153
151
|
children: LiNode
|
|
154
|
-
}
|
|
152
|
+
})
|
|
155
153
|
})
|
|
156
|
-
},
|
|
154
|
+
}, `${id}-${name}`) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
157
155
|
onClick: () => {
|
|
158
156
|
// 查找完整的菜单项数据
|
|
159
157
|
var menuItem = (0, _utils.findMenuItemByKey)(menus, String(id));
|
|
@@ -171,8 +169,8 @@ var FoldMenu = props => {
|
|
|
171
169
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
172
170
|
to: toPath,
|
|
173
171
|
children: LiNode
|
|
174
|
-
}
|
|
175
|
-
});
|
|
172
|
+
})
|
|
173
|
+
}, `${id}-${name}`);
|
|
176
174
|
})
|
|
177
175
|
})
|
|
178
176
|
});
|
package/lib/ProLayout/index.d.ts
CHANGED
|
@@ -10,17 +10,6 @@ interface LayoutContextValue {
|
|
|
10
10
|
export declare const LayoutContext: import("react").Context<LayoutContextValue>;
|
|
11
11
|
declare const ProLayout: {
|
|
12
12
|
(props: ProLayoutType): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
defaultProps: {
|
|
14
|
-
menus: any[];
|
|
15
|
-
iconfontUrl: string;
|
|
16
|
-
title: string;
|
|
17
|
-
collapsed: boolean;
|
|
18
|
-
routerMatch: string;
|
|
19
|
-
pure: boolean;
|
|
20
|
-
theme: string;
|
|
21
|
-
headerHeight: number;
|
|
22
|
-
contentStyle: {};
|
|
23
|
-
};
|
|
24
13
|
ProCollapse: (props: import("./components/ProCollapse/PropTypes").ProCollapseType) => import("react/jsx-runtime").JSX.Element;
|
|
25
14
|
ProFooter: import("react").MemoExoticComponent<(props: import("./components/ProFooter/PropTypes").ProFooterType) => import("react/jsx-runtime").JSX.Element>;
|
|
26
15
|
ProHeader: import("react").MemoExoticComponent<(props: import("./components/ProHeader/PropTypes").ProHeaderType) => import("react/jsx-runtime").JSX.Element>;
|
package/lib/ProLayout/index.js
CHANGED
|
@@ -71,9 +71,11 @@ var ProLayout = props => {
|
|
|
71
71
|
headerTitleRender = props.headerTitleRender,
|
|
72
72
|
headerContentRender = props.headerContentRender,
|
|
73
73
|
rightContentRender = props.rightContentRender,
|
|
74
|
-
title = props.title,
|
|
74
|
+
_props$title = props.title,
|
|
75
|
+
title = _props$title === void 0 ? '' : _props$title,
|
|
75
76
|
logo = props.logo,
|
|
76
|
-
iconfontUrl = props.iconfontUrl,
|
|
77
|
+
_props$iconfontUrl = props.iconfontUrl,
|
|
78
|
+
iconfontUrl = _props$iconfontUrl === void 0 ? '' : _props$iconfontUrl,
|
|
77
79
|
sideMenuFooterRender = props.sideMenuFooterRender,
|
|
78
80
|
sideMenuHeaderRender = props.sideMenuHeaderRender,
|
|
79
81
|
_props$mode = props.mode,
|
|
@@ -256,17 +258,6 @@ var ProLayout = props => {
|
|
|
256
258
|
}))
|
|
257
259
|
});
|
|
258
260
|
};
|
|
259
|
-
ProLayout.defaultProps = {
|
|
260
|
-
menus: [],
|
|
261
|
-
iconfontUrl: '',
|
|
262
|
-
title: '',
|
|
263
|
-
collapsed: false,
|
|
264
|
-
routerMatch: 'id',
|
|
265
|
-
pure: false,
|
|
266
|
-
theme: 'dark',
|
|
267
|
-
headerHeight: 48,
|
|
268
|
-
contentStyle: {}
|
|
269
|
-
};
|
|
270
261
|
ProLayout.ProCollapse = _components.ProCollapse;
|
|
271
262
|
ProLayout.ProFooter = _components.ProFooter;
|
|
272
263
|
ProLayout.ProHeader = _components.ProHeader;
|
package/lib/ProSelect/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PropSelectType, ProSelectActionType } from './propsType';
|
|
3
|
-
import './index.less';
|
|
3
|
+
import './style/index.less';
|
|
4
4
|
export declare const ProSelect: (props: PropSelectType, ref: React.Ref<ProSelectActionType> | undefined) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const _default: React.ForwardRefExoticComponent<PropSelectType & React.RefAttributes<ProSelectActionType>>;
|
|
6
6
|
export default _default;
|
package/lib/ProSelect/index.js
CHANGED
|
@@ -14,9 +14,9 @@ var _AdaptiveTooltip = _interopRequireDefault(require("./components/AdaptiveTool
|
|
|
14
14
|
var _ = require("..");
|
|
15
15
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
16
16
|
var _utils = require("./utils");
|
|
17
|
-
require("./index.less");
|
|
17
|
+
require("./style/index.less");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
var _excluded = ["dataSource", "
|
|
19
|
+
var _excluded = ["dataSource", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "transformResponse", "getValueProps", "getChangeValue", "viewportReady", "isView"];
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -48,7 +48,6 @@ var ProSelect = (props, ref) => {
|
|
|
48
48
|
}
|
|
49
49
|
var _props$dataSource = props.dataSource,
|
|
50
50
|
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
|
51
|
-
defaultDisableValue = props.defaultDisableValue,
|
|
52
51
|
useRequest = props.useRequest,
|
|
53
52
|
fieldNames = props.fieldNames,
|
|
54
53
|
_props$tooltip = props.tooltip,
|
|
@@ -63,9 +62,10 @@ var ProSelect = (props, ref) => {
|
|
|
63
62
|
_onSearch = props.onSearch,
|
|
64
63
|
optionRender = props.optionRender,
|
|
65
64
|
onChange = props.onChange,
|
|
66
|
-
updateDataSource = props.updateDataSource,
|
|
67
65
|
transformResponse = props.transformResponse,
|
|
68
66
|
getValueProps = props.getValueProps,
|
|
67
|
+
getChangeValue = props.getChangeValue,
|
|
68
|
+
viewportReady = props.viewportReady,
|
|
69
69
|
isViewPro = props.isView,
|
|
70
70
|
selectProps = _objectWithoutProperties(props, _excluded);
|
|
71
71
|
selectProps.showCodeName = (_selectProps$showCode = selectProps.showCodeName) !== null && _selectProps$showCode !== void 0 ? _selectProps$showCode : showCodeName;
|
|
@@ -126,8 +126,7 @@ var ProSelect = (props, ref) => {
|
|
|
126
126
|
var responseData = transformResponse(data);
|
|
127
127
|
setSelectList(responseData);
|
|
128
128
|
} else {
|
|
129
|
-
|
|
130
|
-
updateDataSource ? updateDataSource(data, setSelectList) : defaultOnSuccessFun(data);
|
|
129
|
+
defaultOnSuccessFun(data);
|
|
131
130
|
}
|
|
132
131
|
// 执行传入onSuccess
|
|
133
132
|
useRequest === null || useRequest === void 0 || (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 || (_useRequest$options$o = _useRequest$options.onSuccess) === null || _useRequest$options$o === void 0 || _useRequest$options$o.call(_useRequest$options, data, useRequest === null || useRequest === void 0 || (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 ? void 0 : _useRequest$options2.defaultParams);
|
|
@@ -162,8 +161,7 @@ var ProSelect = (props, ref) => {
|
|
|
162
161
|
}
|
|
163
162
|
}, [fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.data]);
|
|
164
163
|
(0, _ahooks.useDeepCompareEffect)(() => {
|
|
165
|
-
|
|
166
|
-
if (defaultDisableValue || !useRequest) {
|
|
164
|
+
if (!useRequest) {
|
|
167
165
|
return;
|
|
168
166
|
}
|
|
169
167
|
var _ref4 = (useRequest === null || useRequest === void 0 ? void 0 : useRequest.options) || {},
|
|
@@ -174,19 +172,21 @@ var ProSelect = (props, ref) => {
|
|
|
174
172
|
}
|
|
175
173
|
var params = Array.isArray(defaultParams) ? defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0] : defaultParams || {};
|
|
176
174
|
fetchFunction.run(params);
|
|
177
|
-
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options
|
|
175
|
+
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
|
178
176
|
|
|
179
|
-
//
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
177
|
+
// 处理 defaultOne 逻辑:当 dataSource 只有一个值且没有 value 时,自动设置默认值
|
|
178
|
+
(0, _react.useEffect)(() => {
|
|
179
|
+
if (defaultOne && !value && !isDefaultOne && (selectList === null || selectList === void 0 ? void 0 : selectList.length) === 1) {
|
|
180
|
+
var option = selectList === null || selectList === void 0 ? void 0 : selectList[0];
|
|
181
|
+
if (option && option[code] !== undefined && option[code] !== null) {
|
|
182
|
+
setIsDefaultOne(true);
|
|
183
|
+
// 使用 setTimeout 确保在下一个事件循环中调用,避免在渲染过程中更新状态
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
onChange === null || onChange === void 0 || onChange(option[code], option);
|
|
186
|
+
}, 0);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}, [defaultOne, value, isDefaultOne, selectList, code, onChange]);
|
|
190
190
|
var transToLabel = value => {
|
|
191
191
|
if (!Array.isArray(selectList) || !selectList.length) {
|
|
192
192
|
return viewEmpty;
|
|
@@ -259,7 +259,6 @@ var ProSelect = (props, ref) => {
|
|
|
259
259
|
if (labelInValue && (isReactElement(_option) || isReactElement(_option === null || _option === void 0 ? void 0 : _option.children))) {
|
|
260
260
|
option = _option === null || _option === void 0 ? void 0 : _option.record;
|
|
261
261
|
}
|
|
262
|
-
var getChangeValue = selectProps.getChangeValue;
|
|
263
262
|
if (selectProps.mode && selectProps.mode === 'multiple') {
|
|
264
263
|
if (Array.isArray(option)) {
|
|
265
264
|
option.forEach(item => {
|
|
@@ -302,18 +301,17 @@ var ProSelect = (props, ref) => {
|
|
|
302
301
|
if (selectProps.mode && value === null) {
|
|
303
302
|
return undefined;
|
|
304
303
|
}
|
|
305
|
-
|
|
304
|
+
// 只有当 dataSource 只有一个值时才默认回填(只返回值,不进行状态更新)
|
|
305
|
+
if (defaultOne && !value && !isDefaultOne && (selectList === null || selectList === void 0 ? void 0 : selectList.length) === 1) {
|
|
306
306
|
var option = selectList === null || selectList === void 0 ? void 0 : selectList[0];
|
|
307
307
|
// selectList 可能是异步回来的值
|
|
308
308
|
if (option) {
|
|
309
|
-
setIsDefaultOne(true);
|
|
310
|
-
onChange === null || onChange === void 0 || onChange(option === null || option === void 0 ? void 0 : option[code], option);
|
|
311
309
|
return option === null || option === void 0 ? void 0 : option[code];
|
|
312
310
|
}
|
|
313
311
|
}
|
|
314
312
|
// 修复空字符placeholder不显示
|
|
315
313
|
if (value === '') {
|
|
316
|
-
return
|
|
314
|
+
return undefined;
|
|
317
315
|
}
|
|
318
316
|
return value;
|
|
319
317
|
};
|
|
@@ -348,12 +346,15 @@ var ProSelect = (props, ref) => {
|
|
|
348
346
|
getPopupContainer: trigger => {
|
|
349
347
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
350
348
|
}
|
|
351
|
-
}, (0, _lodash.omit)(_objectSpread({}, selectProps), ['isView', 'showCodeName', 'form', 'name', 'style', 'onFieldChange'])), {}, {
|
|
349
|
+
}, (0, _lodash.omit)(_objectSpread({}, selectProps), ['isView', 'showCodeName', 'form', 'name', 'style', 'onFieldChange', 'getChangeValue', 'viewportReady'])), {}, {
|
|
352
350
|
value: transformValue(),
|
|
353
|
-
children: Array.isArray(newSelectList) && newSelectList.map(item => {
|
|
351
|
+
children: Array.isArray(newSelectList) && newSelectList.map((item, index) => {
|
|
352
|
+
var itemValue = item[code];
|
|
353
|
+
var itemKey = itemValue != null ? `${itemValue}-${index}` : `option-${index}`;
|
|
354
|
+
var optionValue = itemValue != null ? itemValue : undefined;
|
|
354
355
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Option, {
|
|
355
356
|
label: item[label],
|
|
356
|
-
value:
|
|
357
|
+
value: optionValue,
|
|
357
358
|
record: item,
|
|
358
359
|
disabled: !!item.disabled,
|
|
359
360
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TooltipOption, {
|
|
@@ -363,8 +364,8 @@ var ProSelect = (props, ref) => {
|
|
|
363
364
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
364
365
|
children: selectProps.showCodeName ? `${item[code]}-${item[label]}` : item[label]
|
|
365
366
|
})
|
|
366
|
-
}
|
|
367
|
-
},
|
|
367
|
+
})
|
|
368
|
+
}, itemKey);
|
|
368
369
|
})
|
|
369
370
|
}))
|
|
370
371
|
});
|
|
@@ -50,11 +50,6 @@ export interface PropSelectType extends Omit<SelectProps, 'onSearch'> {
|
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|
|
52
52
|
filterInList?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated 兼容 2.0 版本、3.0 使用view 模式
|
|
55
|
-
* @default -
|
|
56
|
-
*/
|
|
57
|
-
defaultDisableValue?: string;
|
|
58
53
|
/**
|
|
59
54
|
* @description 是否展示 tooltip、当 label 特别长的时候使用
|
|
60
55
|
* @default false
|
|
@@ -89,13 +84,6 @@ export interface PropSelectType extends Omit<SelectProps, 'onSearch'> {
|
|
|
89
84
|
*/
|
|
90
85
|
options?: Options<any, any>;
|
|
91
86
|
};
|
|
92
|
-
/**
|
|
93
|
-
* @deprecated 兼容 2.0 版本、3.0 使用 transformResponse
|
|
94
|
-
* @param data 数据
|
|
95
|
-
* @param setSelectList 设置选择列表的函数
|
|
96
|
-
* @returns
|
|
97
|
-
*/
|
|
98
|
-
updateDataSource?: (data: any, setSelectList: any) => void;
|
|
99
87
|
/**
|
|
100
88
|
* @description 格式化数据
|
|
101
89
|
* @param data 后台返回的数据
|
|
@@ -39,7 +39,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
39
39
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
40
40
|
var SHOW_PARENT = _antd.TreeSelect.SHOW_PARENT;
|
|
41
41
|
var ProTreeSelect = (props, ref) => {
|
|
42
|
-
var _useRequest$options, _selectProps$classNam, _selectProps$classNam2, _selectProps$styles, _selectProps$styles2;
|
|
42
|
+
var _useRequest$options, _useRequest$options3, _selectProps$classNam, _selectProps$classNam2, _selectProps$styles, _selectProps$styles2;
|
|
43
43
|
// 全局属性配置在ConfigProvider
|
|
44
44
|
var _ref = (0, _ProConfigProvider.useProConfig)('ProTreeSelect') || {},
|
|
45
45
|
_ref$fieldNames = _ref.fieldNames,
|
|
@@ -242,7 +242,8 @@ var ProTreeSelect = (props, ref) => {
|
|
|
242
242
|
defaultOnSuccessFun(fetchFunction.data);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
|
|
245
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
246
|
+
}, [fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.data, useRequest === null || useRequest === void 0 || (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.cacheKey]);
|
|
246
247
|
(0, _ahooks.useDeepCompareEffect)(() => {
|
|
247
248
|
if (enumCode) {
|
|
248
249
|
var dictEnum = dics[enumCode] || [];
|
|
@@ -264,7 +265,8 @@ var ProTreeSelect = (props, ref) => {
|
|
|
264
265
|
origDataSource: _resultData
|
|
265
266
|
});
|
|
266
267
|
}
|
|
267
|
-
|
|
268
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
269
|
+
}, [enumCode, dataSource, showCodeName]);
|
|
268
270
|
(0, _ahooks.useDeepCompareEffect)(() => {
|
|
269
271
|
// code存在huo dataSource存在,不执行接口请求
|
|
270
272
|
if (enumCode || dataSource) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -57,10 +57,7 @@
|
|
|
57
57
|
"browserslist": [
|
|
58
58
|
"last 2 versions",
|
|
59
59
|
"Firefox ESR",
|
|
60
|
-
"> 1%"
|
|
61
|
-
"ie >= 11",
|
|
62
|
-
"iOS >= 7",
|
|
63
|
-
"Android >= 4"
|
|
60
|
+
"> 1%"
|
|
64
61
|
],
|
|
65
62
|
"overrides": {
|
|
66
63
|
"react-resizable": {
|
|
@@ -90,9 +87,9 @@
|
|
|
90
87
|
"react-svg": "^15.1.7"
|
|
91
88
|
},
|
|
92
89
|
"peerDependencies": {
|
|
93
|
-
"antd": "^6.0.0",
|
|
94
|
-
"react": "^18.3.0",
|
|
95
|
-
"react-dom": "^18.3.0",
|
|
90
|
+
"antd": "^6.0.0",
|
|
91
|
+
"react": "^18.3.0 || ^19.0.0",
|
|
92
|
+
"react-dom": "^18.3.0 || ^19.0.0",
|
|
96
93
|
"react-router-dom": "^6.0.0"
|
|
97
94
|
},
|
|
98
95
|
"devDependencies": {
|
package/babel.config.js.backup
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
presets: [
|
|
3
|
-
['@babel/preset-env', { loose: true }],
|
|
4
|
-
['@babel/preset-react', { runtime: 'automatic' }],
|
|
5
|
-
'@babel/preset-typescript',
|
|
6
|
-
],
|
|
7
|
-
plugins: [
|
|
8
|
-
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
9
|
-
['@babel/plugin-proposal-class-properties', { loose: true }],
|
|
10
|
-
['@babel/plugin-transform-private-methods', { loose: true }],
|
|
11
|
-
['@babel/plugin-transform-private-property-in-object', { loose: true }],
|
|
12
|
-
],
|
|
13
|
-
};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "4.0.0-ant6",
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "es/index.js",
|
|
7
|
-
"typings": "lib/index.d.ts",
|
|
8
|
-
"homepage": "https://procomponents.zhongan.tech",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"components",
|
|
11
|
-
"design",
|
|
12
|
-
"framework",
|
|
13
|
-
"frontend",
|
|
14
|
-
"react",
|
|
15
|
-
"react-component",
|
|
16
|
-
"ui",
|
|
17
|
-
"zat-design",
|
|
18
|
-
"sisyphus",
|
|
19
|
-
"react-sisyphus",
|
|
20
|
-
"pro-components"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"analyze": "ANALYZE=1 dumi build",
|
|
24
|
-
"build": "father build && mv dist/index.min.css dist/index.esm.css && mv dist/less.min.css dist/less.esm.css",
|
|
25
|
-
"build-es": "father build --format esm",
|
|
26
|
-
"build-lib": "father build --format cjs",
|
|
27
|
-
"build-dist": "father build --format umd",
|
|
28
|
-
"docs": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider\" dumi build",
|
|
29
|
-
"docs:deploy": "gh-pages -d docs-dist",
|
|
30
|
-
"lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
|
|
31
|
-
"lint-staged": "lint-staged",
|
|
32
|
-
"lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx --ignore-pattern '**/__tests__/**' --ignore-pattern '**/*.test.*' --ignore-pattern '**/*.spec.*'",
|
|
33
|
-
"lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
|
|
34
|
-
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
|
|
35
|
-
"lint:prettier": "prettier --check \"**/*\" --end-of-line auto",
|
|
36
|
-
"lint:report": "eslint --ext .jsx,.js src -f checkstyle -o report_zacc_eslint_js.xml & exit 0; stylelint --custom-formatter node_modules/stylelint-checkstyle-formatter src/**/*.{css,scss,less} > report_zacc_stylelint_css.xml & exit 0",
|
|
37
|
-
"lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
|
|
38
|
-
"precommit": "lint-staged",
|
|
39
|
-
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
|
|
40
|
-
"postpublish": "git clean -fd",
|
|
41
|
-
"release": "yarn build && npm publish",
|
|
42
|
-
"release:beta": "yarn build && npm publish --tag=beta",
|
|
43
|
-
"start": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider\" dumi dev",
|
|
44
|
-
"test": "umi-test",
|
|
45
|
-
"test:coverage": "umi-test --coverage",
|
|
46
|
-
"tsc": "tsc --noEmit"
|
|
47
|
-
},
|
|
48
|
-
"husky": {
|
|
49
|
-
"hooks": {
|
|
50
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
51
|
-
"pre-commit": "npm run lint-staged"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"lint-staged": {
|
|
55
|
-
"src/**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js"
|
|
56
|
-
},
|
|
57
|
-
"browserslist": [
|
|
58
|
-
"last 2 versions",
|
|
59
|
-
"Firefox ESR",
|
|
60
|
-
"> 1%",
|
|
61
|
-
"ie >= 11",
|
|
62
|
-
"iOS >= 7",
|
|
63
|
-
"Android >= 4"
|
|
64
|
-
],
|
|
65
|
-
"overrides": {
|
|
66
|
-
"react-resizable": {
|
|
67
|
-
"react-draggable": "<4.5.0"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"resolutions": {
|
|
71
|
-
"mockjs/commander": "9.2.0",
|
|
72
|
-
"react-draggable": "<4.5.0"
|
|
73
|
-
},
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"@ant-design/icons": "^5.6.1",
|
|
76
|
-
"@babel/runtime": "^7.18.0",
|
|
77
|
-
"@dnd-kit/core": "^6.0.8",
|
|
78
|
-
"@dnd-kit/sortable": "^7.0.2",
|
|
79
|
-
"@dnd-kit/utilities": "^3.2.1",
|
|
80
|
-
"@zat-design/utils": "4.0.0-beta.5",
|
|
81
|
-
"ahooks": "3.9.5",
|
|
82
|
-
"antd": "^5.28.1",
|
|
83
|
-
"big.js": "^6.2.1",
|
|
84
|
-
"classnames": "^2.3.1",
|
|
85
|
-
"dayjs": "^1.11.13",
|
|
86
|
-
"lodash": "^4.17.21",
|
|
87
|
-
"rc-resize-observer": "^1.4.0",
|
|
88
|
-
"react-lazyload": "^3.2.1",
|
|
89
|
-
"react-resizable": "^3.0.5",
|
|
90
|
-
"react-svg": "^15.1.7"
|
|
91
|
-
},
|
|
92
|
-
"peerDependencies": {
|
|
93
|
-
"antd": "^5.26.4",
|
|
94
|
-
"react": "^18",
|
|
95
|
-
"react-dom": "^18",
|
|
96
|
-
"react-router-dom": "^6.0.0"
|
|
97
|
-
},
|
|
98
|
-
"devDependencies": {
|
|
99
|
-
"@commitlint/cli": "^12.1.1",
|
|
100
|
-
"@commitlint/config-conventional": "^12.1.1",
|
|
101
|
-
"@testing-library/jest-dom": "^6.0.0",
|
|
102
|
-
"@testing-library/react": "^14.0.0",
|
|
103
|
-
"@types/classnames": "^2.3.1",
|
|
104
|
-
"@types/jest": "^29.5.11",
|
|
105
|
-
"@types/lodash": "^4.14.171",
|
|
106
|
-
"@types/react": "^18.2.0",
|
|
107
|
-
"@types/react-dom": "^18.2.0",
|
|
108
|
-
"@types/react-lazyload": "^3.2.3",
|
|
109
|
-
"@types/react-resizable": "^3.0.8",
|
|
110
|
-
"@typescript-eslint/eslint-plugin": "4.0.1",
|
|
111
|
-
"@typescript-eslint/parser": "4.0.1",
|
|
112
|
-
"@umijs/fabric": "^2.8.1",
|
|
113
|
-
"@umijs/preset-react": "^1.8.22",
|
|
114
|
-
"@umijs/test": "^3.0.5",
|
|
115
|
-
"@zat-design/login-react": "1.0.25",
|
|
116
|
-
"babel-eslint": "10.0.3",
|
|
117
|
-
"babel-plugin-import": "^1.13.8",
|
|
118
|
-
"babel-plugin-lodash": "^3.3.4",
|
|
119
|
-
"commander": "9.2.0",
|
|
120
|
-
"cross-env": "^7.0.3",
|
|
121
|
-
"dumi": "^1.0.9",
|
|
122
|
-
"eslint": "7.10.0",
|
|
123
|
-
"eslint-config-za": "2.1.0",
|
|
124
|
-
"eslint-plugin-babel": "5.3.0",
|
|
125
|
-
"eslint-plugin-complexity": "^1.0.2",
|
|
126
|
-
"eslint-plugin-import": "^2.22.1",
|
|
127
|
-
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
128
|
-
"eslint-plugin-react": "7.16.0",
|
|
129
|
-
"eslint-plugin-react-hooks": "2.2.0",
|
|
130
|
-
"eslint-plugin-unused-imports": "^3.0.0",
|
|
131
|
-
"father": "^4.6.1",
|
|
132
|
-
"gh-pages": "^3.0.0",
|
|
133
|
-
"husky": "^4.0.7",
|
|
134
|
-
"jest-canvas-mock": "^2.5.2",
|
|
135
|
-
"lint-staged": "^10.0.0",
|
|
136
|
-
"mini-css-extract-plugin": "^2.9.4",
|
|
137
|
-
"minimatch": "^10.1.1",
|
|
138
|
-
"mockjs": "^1.0.0",
|
|
139
|
-
"prettier": "^2.5.0",
|
|
140
|
-
"pretty-quick": "^3.1.3",
|
|
141
|
-
"react": "^18.2.0",
|
|
142
|
-
"react-dom": "^18.2.0",
|
|
143
|
-
"react-json-view": "^1.21.3",
|
|
144
|
-
"slash2": "^2.0.0",
|
|
145
|
-
"stylelint": "13.0.0",
|
|
146
|
-
"stylelint-checkstyle-formatter": "0.1.2",
|
|
147
|
-
"typescript": "^4.9.5",
|
|
148
|
-
"webpack-deadcode-plugin": "^0.1.17",
|
|
149
|
-
"yorkie": "^2.0.0"
|
|
150
|
-
},
|
|
151
|
-
"checkFiles": [
|
|
152
|
-
"src/**/*.js*",
|
|
153
|
-
"src/**/*.ts*",
|
|
154
|
-
"src/**/*.tsx*",
|
|
155
|
-
"src/**/*.less",
|
|
156
|
-
"config/**/*.js*",
|
|
157
|
-
"scripts/**/*.js"
|
|
158
|
-
]
|
|
159
|
-
}
|
|
File without changes
|
|
File without changes
|