ls-pro-common 3.0.21 → 3.0.22
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/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/InputTable.js +13 -27
- package/lib/components/InputTable.js +13 -27
- package/package.json +2 -2
|
@@ -337,21 +337,6 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
337
337
|
(_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : (_tableRef$current2$cl = _tableRef$current2.clearSelected) === null || _tableRef$current2$cl === void 0 ? void 0 : _tableRef$current2$cl.call(_tableRef$current2);
|
|
338
338
|
}
|
|
339
339
|
}, [text, multiple]);
|
|
340
|
-
var tableOptions = {};
|
|
341
|
-
if (!multiple) {
|
|
342
|
-
tableOptions.headerTitle = "双击选中当前行数据";
|
|
343
|
-
tableOptions.rowSelection = false;
|
|
344
|
-
} else {
|
|
345
|
-
tableOptions.rowSelection = {
|
|
346
|
-
type: 'checkbox',
|
|
347
|
-
selectedRowKeys: selectedKeys,
|
|
348
|
-
preserveSelectedRowKeys: keepSelect,
|
|
349
|
-
onChange: function onChange(keys, rows) {
|
|
350
|
-
selectRowRef.current = rows;
|
|
351
|
-
setSelectedKeys(keys);
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
340
|
var tableDom = /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
356
341
|
className: "ls-input-table",
|
|
357
342
|
columns: columns,
|
|
@@ -382,28 +367,29 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
382
367
|
};
|
|
383
368
|
},
|
|
384
369
|
toolBarRender: function toolBarRender() {
|
|
385
|
-
return multiple ? [
|
|
386
|
-
/*#__PURE__*/
|
|
387
|
-
// <Button
|
|
388
|
-
// className='ant-btn-gray'
|
|
389
|
-
// key="btnClear"
|
|
390
|
-
// onClick={() => {
|
|
391
|
-
// tableRef.current?.clearSelected?.();
|
|
392
|
-
// handleValue({});
|
|
393
|
-
// }}>清空</Button>,
|
|
394
|
-
React.createElement(_Button, {
|
|
370
|
+
return multiple ? [/*#__PURE__*/React.createElement(_Button, {
|
|
395
371
|
key: "btnConfirm",
|
|
396
372
|
onClick: function onClick() {
|
|
397
373
|
handleValue(selectRowRef.current || []);
|
|
398
374
|
}
|
|
399
375
|
}, "\u786E\u8BA4")] : [];
|
|
400
|
-
}
|
|
401
|
-
|
|
376
|
+
},
|
|
377
|
+
headerTitle: multiple ? null : "双击选中当前行数据",
|
|
402
378
|
cardProps: {
|
|
403
379
|
bodyStyle: {
|
|
404
380
|
padding: 0
|
|
405
381
|
}
|
|
406
382
|
}
|
|
383
|
+
}, tableConfig, {
|
|
384
|
+
rowSelection: multiple ? {
|
|
385
|
+
type: 'checkbox',
|
|
386
|
+
selectedRowKeys: selectedKeys,
|
|
387
|
+
preserveSelectedRowKeys: keepSelect,
|
|
388
|
+
onChange: function onChange(keys, rows) {
|
|
389
|
+
selectRowRef.current = rows;
|
|
390
|
+
setSelectedKeys(keys);
|
|
391
|
+
}
|
|
392
|
+
} : false
|
|
407
393
|
}));
|
|
408
394
|
// 处理有值时,可清空
|
|
409
395
|
useEffect(function () {
|
|
@@ -345,21 +345,6 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
345
345
|
(_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : (_tableRef$current2$cl = _tableRef$current2.clearSelected) === null || _tableRef$current2$cl === void 0 ? void 0 : _tableRef$current2$cl.call(_tableRef$current2);
|
|
346
346
|
}
|
|
347
347
|
}, [text, multiple]);
|
|
348
|
-
var tableOptions = {};
|
|
349
|
-
if (!multiple) {
|
|
350
|
-
tableOptions.headerTitle = "双击选中当前行数据";
|
|
351
|
-
tableOptions.rowSelection = false;
|
|
352
|
-
} else {
|
|
353
|
-
tableOptions.rowSelection = {
|
|
354
|
-
type: 'checkbox',
|
|
355
|
-
selectedRowKeys: selectedKeys,
|
|
356
|
-
preserveSelectedRowKeys: keepSelect,
|
|
357
|
-
onChange: function onChange(keys, rows) {
|
|
358
|
-
selectRowRef.current = rows;
|
|
359
|
-
setSelectedKeys(keys);
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
348
|
var tableDom = /*#__PURE__*/_react.default.createElement(_lsProTable.default, (0, _extends2.default)({
|
|
364
349
|
className: "ls-input-table",
|
|
365
350
|
columns: columns,
|
|
@@ -390,28 +375,29 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
390
375
|
};
|
|
391
376
|
},
|
|
392
377
|
toolBarRender: function toolBarRender() {
|
|
393
|
-
return multiple ? [
|
|
394
|
-
/*#__PURE__*/
|
|
395
|
-
// <Button
|
|
396
|
-
// className='ant-btn-gray'
|
|
397
|
-
// key="btnClear"
|
|
398
|
-
// onClick={() => {
|
|
399
|
-
// tableRef.current?.clearSelected?.();
|
|
400
|
-
// handleValue({});
|
|
401
|
-
// }}>清空</Button>,
|
|
402
|
-
_react.default.createElement(_button.default, {
|
|
378
|
+
return multiple ? [/*#__PURE__*/_react.default.createElement(_button.default, {
|
|
403
379
|
key: "btnConfirm",
|
|
404
380
|
onClick: function onClick() {
|
|
405
381
|
handleValue(selectRowRef.current || []);
|
|
406
382
|
}
|
|
407
383
|
}, "\u786E\u8BA4")] : [];
|
|
408
|
-
}
|
|
409
|
-
|
|
384
|
+
},
|
|
385
|
+
headerTitle: multiple ? null : "双击选中当前行数据",
|
|
410
386
|
cardProps: {
|
|
411
387
|
bodyStyle: {
|
|
412
388
|
padding: 0
|
|
413
389
|
}
|
|
414
390
|
}
|
|
391
|
+
}, tableConfig, {
|
|
392
|
+
rowSelection: multiple ? {
|
|
393
|
+
type: 'checkbox',
|
|
394
|
+
selectedRowKeys: selectedKeys,
|
|
395
|
+
preserveSelectedRowKeys: keepSelect,
|
|
396
|
+
onChange: function onChange(keys, rows) {
|
|
397
|
+
selectRowRef.current = rows;
|
|
398
|
+
setSelectedKeys(keys);
|
|
399
|
+
}
|
|
400
|
+
} : false
|
|
415
401
|
}));
|
|
416
402
|
// 处理有值时,可清空
|
|
417
403
|
(0, _react.useEffect)(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.22",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@ant-design/icons": "^4.3.0",
|
|
24
|
-
"ls-pro-table": "^3.0.
|
|
24
|
+
"ls-pro-table": "^3.0.13",
|
|
25
25
|
"ls-pro-form": "^3.0.6",
|
|
26
26
|
"ls-pro-descriptions": "^3.0.1",
|
|
27
27
|
"ls-pro-card": "^3.0.3",
|