@yilianjituan/yilian_dgerm 0.0.1-alpha.40 → 0.0.1-alpha.42
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.
|
@@ -69,7 +69,6 @@ var Index = function Index(props) {
|
|
|
69
69
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
70
|
isFetchedData = _useState6[0],
|
|
71
71
|
setIsFetchedData = _useState6[1]; // 是否需要获取数据
|
|
72
|
-
var _additionalParameters = dynamicParameter && beforeSearch ? beforeSearch(dynamicParameter) : additionalParameters;
|
|
73
72
|
|
|
74
73
|
/**
|
|
75
74
|
* 查询接口
|
|
@@ -97,7 +96,7 @@ var Index = function Index(props) {
|
|
|
97
96
|
*/
|
|
98
97
|
var getStoreList = /*#__PURE__*/function () {
|
|
99
98
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(type) {
|
|
100
|
-
var data, target, options;
|
|
99
|
+
var _additionalParameters, data, target, options;
|
|
101
100
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
102
101
|
while (1) switch (_context2.prev = _context2.next) {
|
|
103
102
|
case 0:
|
|
@@ -107,10 +106,11 @@ var Index = function Index(props) {
|
|
|
107
106
|
}
|
|
108
107
|
return _context2.abrupt("return");
|
|
109
108
|
case 2:
|
|
109
|
+
_additionalParameters = dynamicParameter && beforeSearch ? beforeSearch(dynamicParameter) : additionalParameters;
|
|
110
110
|
setSelectState(true);
|
|
111
|
-
_context2.next =
|
|
111
|
+
_context2.next = 6;
|
|
112
112
|
return inquireDiseases(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, searchValue, paramsRef.current), "pageNo", pageRef.current), "pageSize", 10), _additionalParameters || {}));
|
|
113
|
-
case
|
|
113
|
+
case 6:
|
|
114
114
|
data = _context2.sent;
|
|
115
115
|
if (data.code === "OK") {
|
|
116
116
|
target = data.result;
|
|
@@ -121,7 +121,7 @@ var Index = function Index(props) {
|
|
|
121
121
|
setIsFetchedData(false); // 设置不需要获取数据
|
|
122
122
|
setSelectState(false);
|
|
123
123
|
}
|
|
124
|
-
case
|
|
124
|
+
case 8:
|
|
125
125
|
case "end":
|
|
126
126
|
return _context2.stop();
|
|
127
127
|
}
|
|
@@ -138,7 +138,7 @@ var Index = function Index(props) {
|
|
|
138
138
|
}, [isInitSearch]);
|
|
139
139
|
useEffect(function () {
|
|
140
140
|
setIsFetchedData(true); // 设置需要获取数据
|
|
141
|
-
}, [
|
|
141
|
+
}, [additionalParameters, dynamicParameter && (beforeSearch === null || beforeSearch === void 0 ? void 0 : beforeSearch(dynamicParameter))]);
|
|
142
142
|
|
|
143
143
|
// 搜索
|
|
144
144
|
var onFilterChange = _.debounce(function (e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["onResize", "width", "isEnd"],
|
|
2
|
-
_excluded2 = ["components", "columns", "dataSource"];
|
|
2
|
+
_excluded2 = ["components", "columns", "dataSource", "tableLayout"];
|
|
3
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -87,7 +87,11 @@ var mergedColumns = function mergedColumns(columns, tableRef, newColumnsVoid) {
|
|
|
87
87
|
// 设置默认宽度
|
|
88
88
|
isEnd: index === columns.length - 1,
|
|
89
89
|
// 判断是否是最后一个
|
|
90
|
-
onResize: handleResize(index, columns
|
|
90
|
+
onResize: handleResize(index, columns.map(function (column) {
|
|
91
|
+
return _objectSpread(_objectSpread({}, column), {}, {
|
|
92
|
+
width: typeof column.width === 'number' ? column.width : widthsList[index] || 150
|
|
93
|
+
});
|
|
94
|
+
}), newColumnsVoid)
|
|
91
95
|
};
|
|
92
96
|
}
|
|
93
97
|
});
|
|
@@ -125,6 +129,7 @@ var CustomTable = function CustomTable(props) {
|
|
|
125
129
|
var components = props.components,
|
|
126
130
|
columns = props.columns,
|
|
127
131
|
dataSource = props.dataSource,
|
|
132
|
+
tableLayout = props.tableLayout,
|
|
128
133
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
129
134
|
var tableRef = useRef(null); // 引用 Table 外层容器
|
|
130
135
|
var _React$useState = React.useState(columns),
|
|
@@ -146,7 +151,8 @@ var CustomTable = function CustomTable(props) {
|
|
|
146
151
|
return setColumn(_columns);
|
|
147
152
|
}),
|
|
148
153
|
components: customComponents,
|
|
149
|
-
dataSource: dataSource || []
|
|
154
|
+
dataSource: dataSource || [],
|
|
155
|
+
tableLayout: tableLayout || 'auto'
|
|
150
156
|
})));
|
|
151
157
|
};
|
|
152
158
|
export { mergedColumns, ResizableTitle, CustomTable };
|
|
@@ -43,7 +43,8 @@ var Index = function Index(props) {
|
|
|
43
43
|
// rows = 1时,需要自行设置css,否则会默认全部展示
|
|
44
44
|
className: rows === 1 && !expanded && !expandable ? 'custom_Typography_row1' : '',
|
|
45
45
|
style: {
|
|
46
|
-
marginBottom: 0
|
|
46
|
+
marginBottom: 0,
|
|
47
|
+
color: '#000000'
|
|
47
48
|
},
|
|
48
49
|
ellipsis: _objectSpread({
|
|
49
50
|
rows: rows,
|