wargerm 0.4.35 → 0.4.36
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.
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { TreeSelectProps as Props } from 'antd/lib/tree-select';
|
3
|
+
import { ReactNode } from 'react';
|
3
4
|
interface TreeSelectProps<T> extends Props<T> {
|
4
5
|
treeNodeLabelProp?: string;
|
5
6
|
treeNodeValueProp?: string;
|
@@ -7,6 +8,7 @@ interface TreeSelectProps<T> extends Props<T> {
|
|
7
8
|
request?: () => Promise<any>;
|
8
9
|
onLoad?: (options: Record<string, any>[]) => void;
|
9
10
|
params?: Record<string, any>;
|
11
|
+
children?: ReactNode;
|
10
12
|
}
|
11
13
|
export declare type IndexComponent = React.FC<TreeSelectProps<any>> & {
|
12
14
|
TreeNode?: React.FC<any>;
|
package/dist/index.esm.js
CHANGED
@@ -712,11 +712,11 @@ var WSelect = function WSelect(props) {
|
|
712
712
|
case 6:
|
713
713
|
setResList(res);
|
714
714
|
onLoad && onLoad(res);
|
715
|
-
node = res.map(function (item) {
|
715
|
+
node = res === null || res === void 0 ? void 0 : res.map(function (item) {
|
716
716
|
return /*#__PURE__*/React.createElement(_Select.Option, {
|
717
717
|
key: item.value,
|
718
718
|
value: item.value
|
719
|
-
}, item.label);
|
719
|
+
}, item.label) || /*#__PURE__*/React.createElement(React.Fragment, null);
|
720
720
|
});
|
721
721
|
setChildrenNode(node);
|
722
722
|
|
@@ -8336,7 +8336,7 @@ function Table(_ref) {
|
|
8336
8336
|
|
8337
8337
|
var current = obj.current,
|
8338
8338
|
pageSize = obj.pageSize;
|
8339
|
-
setDataSource(tableList ? tableList.slice((current - 1) * pageSize, current * pageSize) : []);
|
8339
|
+
setDataSource(tableList ? (tableList === null || tableList === void 0 ? void 0 : tableList.slice((current - 1) * pageSize, current * pageSize)) || [] : []);
|
8340
8340
|
return obj;
|
8341
8341
|
});
|
8342
8342
|
|
package/dist/index.js
CHANGED
@@ -771,11 +771,11 @@ var WSelect = function WSelect(props) {
|
|
771
771
|
case 6:
|
772
772
|
setResList(res);
|
773
773
|
onLoad && onLoad(res);
|
774
|
-
node = res.map(function (item) {
|
774
|
+
node = res === null || res === void 0 ? void 0 : res.map(function (item) {
|
775
775
|
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'].Option, {
|
776
776
|
key: item.value,
|
777
777
|
value: item.value
|
778
|
-
}, item.label);
|
778
|
+
}, item.label) || /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
779
779
|
});
|
780
780
|
setChildrenNode(node);
|
781
781
|
|
@@ -8395,7 +8395,7 @@ function Table(_ref) {
|
|
8395
8395
|
|
8396
8396
|
var current = obj.current,
|
8397
8397
|
pageSize = obj.pageSize;
|
8398
|
-
setDataSource(tableList ? tableList.slice((current - 1) * pageSize, current * pageSize) : []);
|
8398
|
+
setDataSource(tableList ? (tableList === null || tableList === void 0 ? void 0 : tableList.slice((current - 1) * pageSize, current * pageSize)) || [] : []);
|
8399
8399
|
return obj;
|
8400
8400
|
});
|
8401
8401
|
|