linkmore-design 1.0.14 → 1.0.15
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/index.umd.js +23 -10
- package/dist/index.umd.min.js +2 -2
- package/es/Button/index.js +3 -1
- package/es/Button/style/style.css +4 -1
- package/es/CkFilter/components/filterTypes.js +1 -0
- package/es/CkFilter/style/style.css +1 -1
- package/es/PopTable/style/style.css +1 -4
- package/es/ProTable/Table.js +19 -9
- package/es/ProTable/style/style.css +7 -0
- package/es/Radio/style/style.css +7 -0
- package/es/TabBar/style/style.css +0 -1
- package/lib/Button/index.js +3 -1
- package/lib/Button/style/style.css +4 -1
- package/lib/CkFilter/components/filterTypes.js +1 -0
- package/lib/CkFilter/style/style.css +1 -1
- package/lib/PopTable/style/style.css +1 -4
- package/lib/ProTable/Table.js +19 -9
- package/lib/ProTable/style/style.css +7 -0
- package/lib/Radio/style/style.css +7 -0
- package/lib/TabBar/style/style.css +0 -1
- package/package.json +1 -1
package/es/Button/index.js
CHANGED
|
@@ -29,7 +29,9 @@ var LMButton = function LMButton(props) {
|
|
|
29
29
|
hover = _props$hover === void 0 ? false : _props$hover,
|
|
30
30
|
restProps = __rest(props, ["children", "className", "size", "type", "hover"]);
|
|
31
31
|
|
|
32
|
-
var classs = cls('lm-button', className,
|
|
32
|
+
var classs = cls('lm-button', className, {
|
|
33
|
+
'lm-button-icon-only': !children
|
|
34
|
+
}, _defineProperty({}, "lm-button-".concat(size), size), _defineProperty({}, "lm-button-".concat(type), type), _defineProperty({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
33
35
|
return /*#__PURE__*/React.createElement(_Button, Object.assign({}, restProps, {
|
|
34
36
|
className: classs,
|
|
35
37
|
size: size,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
vertical-align: middle;
|
|
8
8
|
}
|
|
9
9
|
.ant-btn.lm-button .anticon {
|
|
10
|
-
font-size:
|
|
10
|
+
font-size: 12px;
|
|
11
11
|
line-height: 0;
|
|
12
12
|
}
|
|
13
13
|
.ant-btn.lm-button .anticon + span {
|
|
@@ -96,3 +96,6 @@
|
|
|
96
96
|
border: 0 !important;
|
|
97
97
|
background: transparent !important;
|
|
98
98
|
}
|
|
99
|
+
.ant-btn.lm-button-icon-only .anticon {
|
|
100
|
+
font-size: 16px;
|
|
101
|
+
}
|
|
@@ -408,6 +408,7 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
|
|
|
408
408
|
onClick: handleReset
|
|
409
409
|
}, "\u6E05\u7A7A"), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
410
410
|
type: "primary",
|
|
411
|
+
disabled: !checkedValues.length,
|
|
411
412
|
size: "small",
|
|
412
413
|
onClick: handleSure
|
|
413
414
|
}, "\u786E\u5B9A")));
|
|
@@ -520,9 +520,6 @@ html {
|
|
|
520
520
|
align-items: center;
|
|
521
521
|
justify-content: center;
|
|
522
522
|
}
|
|
523
|
-
.lm_popover_table .lm_operate .ant-btn > .anticon:not(.anticon-down) {
|
|
524
|
-
font-size: 14px;
|
|
525
|
-
}
|
|
526
523
|
.lm_popover_table .lm_operate .anticon + span,
|
|
527
524
|
.lm_popover_table .lm_operate span + .anticon {
|
|
528
525
|
margin-left: calc(var(--gap) / 2);
|
|
@@ -687,7 +684,7 @@ html {
|
|
|
687
684
|
}
|
|
688
685
|
.lm_popover_table .lm_grid .ant-pagination {
|
|
689
686
|
font-size: 12px;
|
|
690
|
-
padding-top:
|
|
687
|
+
padding-top: 10px;
|
|
691
688
|
margin: 0;
|
|
692
689
|
}
|
|
693
690
|
.lm_popover_table .lm_grid .ant-pagination .ant-select {
|
package/es/ProTable/Table.js
CHANGED
|
@@ -33,7 +33,7 @@ var _VList = require("./VList");
|
|
|
33
33
|
|
|
34
34
|
var _resetConfig = _interopRequireDefault(require("./resetConfig"));
|
|
35
35
|
|
|
36
|
-
var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading"];
|
|
36
|
+
var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "customCheck"];
|
|
37
37
|
var Summary = _proTable.default.Summary;
|
|
38
38
|
exports.Summary = Summary;
|
|
39
39
|
var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -47,6 +47,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
47
47
|
pagination = props.pagination,
|
|
48
48
|
hiddenPage = props.hiddenPage,
|
|
49
49
|
loading = props.loading,
|
|
50
|
+
customCheck = props.customCheck,
|
|
50
51
|
resetProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
51
52
|
var _resetProps$rowKey = resetProps.rowKey,
|
|
52
53
|
rowKey = _resetProps$rowKey === void 0 ? 'id' : _resetProps$rowKey;
|
|
@@ -179,7 +180,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
179
180
|
selectedRowKeys: useSelectedRows.selectedRows.map(function (v) {
|
|
180
181
|
return v[rowKey];
|
|
181
182
|
}),
|
|
182
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
183
|
+
onChange: function onChange(selectedRowKeys, selectedRows, t, s) {
|
|
183
184
|
setSelectedRows({
|
|
184
185
|
selectedRows: selectedRows
|
|
185
186
|
});
|
|
@@ -188,7 +189,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
188
189
|
},
|
|
189
190
|
onRow: function onRow(record) {
|
|
190
191
|
return {
|
|
191
|
-
onClick: function onClick() {
|
|
192
|
+
onClick: function onClick(e) {
|
|
192
193
|
onRecord(record);
|
|
193
194
|
},
|
|
194
195
|
onDoubleClick: function onDoubleClick() {
|
|
@@ -239,10 +240,10 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
239
240
|
}
|
|
240
241
|
});
|
|
241
242
|
setColumnsStateMap(obj);
|
|
242
|
-
}, []);
|
|
243
|
-
(
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
}, []); // useEffect(() => {
|
|
244
|
+
// rowClick?.()
|
|
245
|
+
// }, [useSelectedRows])
|
|
246
|
+
// 将节点方法给外部使用
|
|
246
247
|
|
|
247
248
|
_react.default.useImperativeHandle(ref, function () {
|
|
248
249
|
return {
|
|
@@ -251,9 +252,16 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
251
252
|
},
|
|
252
253
|
// 用于按钮触发事件
|
|
253
254
|
clearSelect: function clearSelect() {
|
|
254
|
-
|
|
255
|
+
setSelectedRows({
|
|
255
256
|
selectedRows: []
|
|
256
257
|
});
|
|
258
|
+
rowClick === null || rowClick === void 0 ? void 0 : rowClick([]);
|
|
259
|
+
},
|
|
260
|
+
customSetCheckboxRecords: function customSetCheckboxRecords(value) {
|
|
261
|
+
setSelectedRows({
|
|
262
|
+
selectedRows: value
|
|
263
|
+
});
|
|
264
|
+
rowClick === null || rowClick === void 0 ? void 0 : rowClick(value);
|
|
257
265
|
}
|
|
258
266
|
};
|
|
259
267
|
}); // loading触发清空选中状态
|
|
@@ -277,7 +285,9 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
277
285
|
summary: function summary(pageData) {
|
|
278
286
|
return _summary && _summary(pageData, resultColumns);
|
|
279
287
|
}
|
|
280
|
-
}))
|
|
288
|
+
})), !!customCheck && /*#__PURE__*/_react.default.createElement("div", {
|
|
289
|
+
className: "lm_customCheck"
|
|
290
|
+
}, customCheck));
|
|
281
291
|
}); // 监听大小: 这里的高度是整个表格的高度,表体需要减去列头和分页的高度
|
|
282
292
|
|
|
283
293
|
var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
package/es/Radio/style/style.css
CHANGED
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
color: var(--font-color);
|
|
35
35
|
vertical-align: middle;
|
|
36
36
|
}
|
|
37
|
+
.lm-radio-group .ant-radio-button-wrapper .anticon {
|
|
38
|
+
font-size: 16px;
|
|
39
|
+
vertical-align: middle;
|
|
40
|
+
}
|
|
41
|
+
.lm-radio-group .ant-radio-button-wrapper:hover {
|
|
42
|
+
color: var(--primary-color);
|
|
43
|
+
}
|
|
37
44
|
.lm-radio-group .ant-radio-button-wrapper > span:last-child {
|
|
38
45
|
display: inline-block;
|
|
39
46
|
font-size: 12px;
|
package/lib/Button/index.js
CHANGED
|
@@ -41,7 +41,9 @@ var LMButton = function LMButton(props) {
|
|
|
41
41
|
hover = _props$hover === void 0 ? false : _props$hover,
|
|
42
42
|
restProps = __rest(props, ["children", "className", "size", "type", "hover"]);
|
|
43
43
|
|
|
44
|
-
var classs = (0, _classnames.default)('lm-button', className,
|
|
44
|
+
var classs = (0, _classnames.default)('lm-button', className, {
|
|
45
|
+
'lm-button-icon-only': !children
|
|
46
|
+
}, (0, _defineProperty2.default)({}, "lm-button-".concat(size), size), (0, _defineProperty2.default)({}, "lm-button-".concat(type), type), (0, _defineProperty2.default)({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
45
47
|
return /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({}, restProps, {
|
|
46
48
|
className: classs,
|
|
47
49
|
size: size,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
vertical-align: middle;
|
|
8
8
|
}
|
|
9
9
|
.ant-btn.lm-button .anticon {
|
|
10
|
-
font-size:
|
|
10
|
+
font-size: 12px;
|
|
11
11
|
line-height: 0;
|
|
12
12
|
}
|
|
13
13
|
.ant-btn.lm-button .anticon + span {
|
|
@@ -96,3 +96,6 @@
|
|
|
96
96
|
border: 0 !important;
|
|
97
97
|
background: transparent !important;
|
|
98
98
|
}
|
|
99
|
+
.ant-btn.lm-button-icon-only .anticon {
|
|
100
|
+
font-size: 16px;
|
|
101
|
+
}
|
|
@@ -408,6 +408,7 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
|
|
|
408
408
|
onClick: handleReset
|
|
409
409
|
}, "\u6E05\u7A7A"), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
410
410
|
type: "primary",
|
|
411
|
+
disabled: !checkedValues.length,
|
|
411
412
|
size: "small",
|
|
412
413
|
onClick: handleSure
|
|
413
414
|
}, "\u786E\u5B9A")));
|
|
@@ -520,9 +520,6 @@ html {
|
|
|
520
520
|
align-items: center;
|
|
521
521
|
justify-content: center;
|
|
522
522
|
}
|
|
523
|
-
.lm_popover_table .lm_operate .ant-btn > .anticon:not(.anticon-down) {
|
|
524
|
-
font-size: 14px;
|
|
525
|
-
}
|
|
526
523
|
.lm_popover_table .lm_operate .anticon + span,
|
|
527
524
|
.lm_popover_table .lm_operate span + .anticon {
|
|
528
525
|
margin-left: calc(var(--gap) / 2);
|
|
@@ -687,7 +684,7 @@ html {
|
|
|
687
684
|
}
|
|
688
685
|
.lm_popover_table .lm_grid .ant-pagination {
|
|
689
686
|
font-size: 12px;
|
|
690
|
-
padding-top:
|
|
687
|
+
padding-top: 10px;
|
|
691
688
|
margin: 0;
|
|
692
689
|
}
|
|
693
690
|
.lm_popover_table .lm_grid .ant-pagination .ant-select {
|
package/lib/ProTable/Table.js
CHANGED
|
@@ -33,7 +33,7 @@ var _VList = require("./VList");
|
|
|
33
33
|
|
|
34
34
|
var _resetConfig = _interopRequireDefault(require("./resetConfig"));
|
|
35
35
|
|
|
36
|
-
var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading"];
|
|
36
|
+
var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "customCheck"];
|
|
37
37
|
var Summary = _proTable.default.Summary;
|
|
38
38
|
exports.Summary = Summary;
|
|
39
39
|
var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -47,6 +47,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
47
47
|
pagination = props.pagination,
|
|
48
48
|
hiddenPage = props.hiddenPage,
|
|
49
49
|
loading = props.loading,
|
|
50
|
+
customCheck = props.customCheck,
|
|
50
51
|
resetProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
51
52
|
var _resetProps$rowKey = resetProps.rowKey,
|
|
52
53
|
rowKey = _resetProps$rowKey === void 0 ? 'id' : _resetProps$rowKey;
|
|
@@ -179,7 +180,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
179
180
|
selectedRowKeys: useSelectedRows.selectedRows.map(function (v) {
|
|
180
181
|
return v[rowKey];
|
|
181
182
|
}),
|
|
182
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
183
|
+
onChange: function onChange(selectedRowKeys, selectedRows, t, s) {
|
|
183
184
|
setSelectedRows({
|
|
184
185
|
selectedRows: selectedRows
|
|
185
186
|
});
|
|
@@ -188,7 +189,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
188
189
|
},
|
|
189
190
|
onRow: function onRow(record) {
|
|
190
191
|
return {
|
|
191
|
-
onClick: function onClick() {
|
|
192
|
+
onClick: function onClick(e) {
|
|
192
193
|
onRecord(record);
|
|
193
194
|
},
|
|
194
195
|
onDoubleClick: function onDoubleClick() {
|
|
@@ -239,10 +240,10 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
239
240
|
}
|
|
240
241
|
});
|
|
241
242
|
setColumnsStateMap(obj);
|
|
242
|
-
}, []);
|
|
243
|
-
(
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
}, []); // useEffect(() => {
|
|
244
|
+
// rowClick?.()
|
|
245
|
+
// }, [useSelectedRows])
|
|
246
|
+
// 将节点方法给外部使用
|
|
246
247
|
|
|
247
248
|
_react.default.useImperativeHandle(ref, function () {
|
|
248
249
|
return {
|
|
@@ -251,9 +252,16 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
251
252
|
},
|
|
252
253
|
// 用于按钮触发事件
|
|
253
254
|
clearSelect: function clearSelect() {
|
|
254
|
-
|
|
255
|
+
setSelectedRows({
|
|
255
256
|
selectedRows: []
|
|
256
257
|
});
|
|
258
|
+
rowClick === null || rowClick === void 0 ? void 0 : rowClick([]);
|
|
259
|
+
},
|
|
260
|
+
customSetCheckboxRecords: function customSetCheckboxRecords(value) {
|
|
261
|
+
setSelectedRows({
|
|
262
|
+
selectedRows: value
|
|
263
|
+
});
|
|
264
|
+
rowClick === null || rowClick === void 0 ? void 0 : rowClick(value);
|
|
257
265
|
}
|
|
258
266
|
};
|
|
259
267
|
}); // loading触发清空选中状态
|
|
@@ -277,7 +285,9 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
277
285
|
summary: function summary(pageData) {
|
|
278
286
|
return _summary && _summary(pageData, resultColumns);
|
|
279
287
|
}
|
|
280
|
-
}))
|
|
288
|
+
})), !!customCheck && /*#__PURE__*/_react.default.createElement("div", {
|
|
289
|
+
className: "lm_customCheck"
|
|
290
|
+
}, customCheck));
|
|
281
291
|
}); // 监听大小: 这里的高度是整个表格的高度,表体需要减去列头和分页的高度
|
|
282
292
|
|
|
283
293
|
var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
color: var(--font-color);
|
|
35
35
|
vertical-align: middle;
|
|
36
36
|
}
|
|
37
|
+
.lm-radio-group .ant-radio-button-wrapper .anticon {
|
|
38
|
+
font-size: 16px;
|
|
39
|
+
vertical-align: middle;
|
|
40
|
+
}
|
|
41
|
+
.lm-radio-group .ant-radio-button-wrapper:hover {
|
|
42
|
+
color: var(--primary-color);
|
|
43
|
+
}
|
|
37
44
|
.lm-radio-group .ant-radio-button-wrapper > span:last-child {
|
|
38
45
|
display: inline-block;
|
|
39
46
|
font-size: 12px;
|