ls-pro-common 3.0.21 → 3.0.23
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.css +24 -7
- package/dist/common.js +1 -1
- package/dist/common.min.css +24 -7
- package/dist/common.min.js +1 -1
- package/es/components/DescritionCard.js +3 -11
- package/es/components/InputTable.js +13 -27
- package/es/components/common.less +28 -24
- package/lib/components/DescritionCard.js +3 -11
- package/lib/components/InputTable.js +13 -27
- package/lib/components/common.less +28 -24
- package/package.json +2 -2
|
@@ -27,23 +27,15 @@ function DescritionCard(props) {
|
|
|
27
27
|
setCollapsed = _useState2[1];
|
|
28
28
|
var titleLayout = useMemo(function () {
|
|
29
29
|
if (typeof title === 'string') {
|
|
30
|
-
return /*#__PURE__*/React.createElement("
|
|
31
|
-
className: 'description-card-title'
|
|
32
|
-
}, /*#__PURE__*/React.createElement("span", null, title));
|
|
33
|
-
} else {
|
|
34
|
-
return title;
|
|
30
|
+
return /*#__PURE__*/React.createElement("span", null, title);
|
|
35
31
|
}
|
|
32
|
+
return title;
|
|
36
33
|
}, [title]);
|
|
37
34
|
var collapsedDom = useMemo(function () {
|
|
38
35
|
if (!collapsible) return null;
|
|
39
36
|
return /*#__PURE__*/React.createElement(UpOutlined, {
|
|
40
37
|
rotate: !!collapsed ? 180 : undefined,
|
|
41
|
-
|
|
42
|
-
margin: 'auto',
|
|
43
|
-
marginLeft: '24px',
|
|
44
|
-
fontSize: '16px',
|
|
45
|
-
color: 'var(--ant-primary-color, #4997e6)'
|
|
46
|
-
},
|
|
38
|
+
className: "btn-expand",
|
|
47
39
|
onClick: function onClick() {
|
|
48
40
|
setCollapsed(!collapsed);
|
|
49
41
|
},
|
|
@@ -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 () {
|
|
@@ -145,23 +145,7 @@ body.theme-yellow {
|
|
|
145
145
|
justify-items: center;
|
|
146
146
|
padding: 8px 20px;
|
|
147
147
|
background: #fff;
|
|
148
|
-
// border-bottom: 1px solid #f0f0f0;
|
|
149
148
|
|
|
150
|
-
// .dtl-back {
|
|
151
|
-
// display : flex;
|
|
152
|
-
// align-items : center;
|
|
153
|
-
// padding-right: 5px;
|
|
154
|
-
|
|
155
|
-
// >span {
|
|
156
|
-
// padding : 3px;
|
|
157
|
-
// border-radius: 2px;
|
|
158
|
-
|
|
159
|
-
// &:hover {
|
|
160
|
-
// background: var(--ant-primary-2);
|
|
161
|
-
// color : var(--ant-primary-color)
|
|
162
|
-
// }
|
|
163
|
-
// }
|
|
164
|
-
// }
|
|
165
149
|
|
|
166
150
|
.dtl-title {
|
|
167
151
|
font-size: 16px;
|
|
@@ -323,26 +307,46 @@ a:hover {
|
|
|
323
307
|
|
|
324
308
|
.description-card {
|
|
325
309
|
|
|
310
|
+
border: solid 1px #EAEEF2;
|
|
311
|
+
|
|
312
|
+
&.ant-pro-card {
|
|
313
|
+
box-shadow: none;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.btn-expand {
|
|
317
|
+
margin: auto;
|
|
318
|
+
margin-left: 20px;
|
|
319
|
+
font-size: 13px;
|
|
320
|
+
color: #8C8C8C;
|
|
321
|
+
|
|
322
|
+
:hover {
|
|
323
|
+
color: var(--ant-primary-color)
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
326
327
|
.ant-pro-card-header {
|
|
327
|
-
height:
|
|
328
|
+
height: 38px;
|
|
329
|
+
padding: 12px;
|
|
330
|
+
background-color: #F4F7FD;
|
|
328
331
|
}
|
|
329
332
|
|
|
330
333
|
.ant-pro-card-body {
|
|
331
|
-
padding: 12px
|
|
334
|
+
padding: 20px 12px;
|
|
332
335
|
}
|
|
333
336
|
|
|
334
337
|
.ant-pro-card-header-border {
|
|
335
|
-
border-bottom: 1px solid #
|
|
338
|
+
border-bottom: 1px solid #EAEEF2;
|
|
336
339
|
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.has-background {
|
|
340
|
-
background: #f6fafe;
|
|
341
340
|
|
|
342
341
|
.ant-descriptions-row>td,
|
|
343
342
|
.ant-descriptions-row>th {
|
|
344
|
-
padding-bottom:
|
|
343
|
+
padding-bottom: 12px
|
|
345
344
|
}
|
|
345
|
+
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.has-background {
|
|
349
|
+
background: #f6fafe;
|
|
346
350
|
}
|
|
347
351
|
|
|
348
352
|
|
|
@@ -35,23 +35,15 @@ function DescritionCard(props) {
|
|
|
35
35
|
setCollapsed = _useState2[1];
|
|
36
36
|
var titleLayout = (0, _react.useMemo)(function () {
|
|
37
37
|
if (typeof title === 'string') {
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
39
|
-
className: 'description-card-title'
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, title));
|
|
41
|
-
} else {
|
|
42
|
-
return title;
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement("span", null, title);
|
|
43
39
|
}
|
|
40
|
+
return title;
|
|
44
41
|
}, [title]);
|
|
45
42
|
var collapsedDom = (0, _react.useMemo)(function () {
|
|
46
43
|
if (!collapsible) return null;
|
|
47
44
|
return /*#__PURE__*/_react.default.createElement(_icons.UpOutlined, {
|
|
48
45
|
rotate: !!collapsed ? 180 : undefined,
|
|
49
|
-
|
|
50
|
-
margin: 'auto',
|
|
51
|
-
marginLeft: '24px',
|
|
52
|
-
fontSize: '16px',
|
|
53
|
-
color: 'var(--ant-primary-color, #4997e6)'
|
|
54
|
-
},
|
|
46
|
+
className: "btn-expand",
|
|
55
47
|
onClick: function onClick() {
|
|
56
48
|
setCollapsed(!collapsed);
|
|
57
49
|
},
|
|
@@ -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 () {
|
|
@@ -145,23 +145,7 @@ body.theme-yellow {
|
|
|
145
145
|
justify-items: center;
|
|
146
146
|
padding: 8px 20px;
|
|
147
147
|
background: #fff;
|
|
148
|
-
// border-bottom: 1px solid #f0f0f0;
|
|
149
148
|
|
|
150
|
-
// .dtl-back {
|
|
151
|
-
// display : flex;
|
|
152
|
-
// align-items : center;
|
|
153
|
-
// padding-right: 5px;
|
|
154
|
-
|
|
155
|
-
// >span {
|
|
156
|
-
// padding : 3px;
|
|
157
|
-
// border-radius: 2px;
|
|
158
|
-
|
|
159
|
-
// &:hover {
|
|
160
|
-
// background: var(--ant-primary-2);
|
|
161
|
-
// color : var(--ant-primary-color)
|
|
162
|
-
// }
|
|
163
|
-
// }
|
|
164
|
-
// }
|
|
165
149
|
|
|
166
150
|
.dtl-title {
|
|
167
151
|
font-size: 16px;
|
|
@@ -323,26 +307,46 @@ a:hover {
|
|
|
323
307
|
|
|
324
308
|
.description-card {
|
|
325
309
|
|
|
310
|
+
border: solid 1px #EAEEF2;
|
|
311
|
+
|
|
312
|
+
&.ant-pro-card {
|
|
313
|
+
box-shadow: none;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.btn-expand {
|
|
317
|
+
margin: auto;
|
|
318
|
+
margin-left: 20px;
|
|
319
|
+
font-size: 13px;
|
|
320
|
+
color: #8C8C8C;
|
|
321
|
+
|
|
322
|
+
:hover {
|
|
323
|
+
color: var(--ant-primary-color)
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
326
327
|
.ant-pro-card-header {
|
|
327
|
-
height:
|
|
328
|
+
height: 38px;
|
|
329
|
+
padding: 12px;
|
|
330
|
+
background-color: #F4F7FD;
|
|
328
331
|
}
|
|
329
332
|
|
|
330
333
|
.ant-pro-card-body {
|
|
331
|
-
padding: 12px
|
|
334
|
+
padding: 20px 12px;
|
|
332
335
|
}
|
|
333
336
|
|
|
334
337
|
.ant-pro-card-header-border {
|
|
335
|
-
border-bottom: 1px solid #
|
|
338
|
+
border-bottom: 1px solid #EAEEF2;
|
|
336
339
|
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.has-background {
|
|
340
|
-
background: #f6fafe;
|
|
341
340
|
|
|
342
341
|
.ant-descriptions-row>td,
|
|
343
342
|
.ant-descriptions-row>th {
|
|
344
|
-
padding-bottom:
|
|
343
|
+
padding-bottom: 12px
|
|
345
344
|
}
|
|
345
|
+
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.has-background {
|
|
349
|
+
background: #f6fafe;
|
|
346
350
|
}
|
|
347
351
|
|
|
348
352
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.23",
|
|
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",
|