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.
@@ -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, _defineProperty({}, "lm-button-".concat(size), size), _defineProperty({}, "lm-button-".concat(type), type), _defineProperty({}, "lm-button-".concat(type, "-hover"), type && hover));
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: 16px;
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")));
@@ -704,7 +704,7 @@ html {
704
704
  align-items: center;
705
705
  justify-content: space-between;
706
706
  font-size: 12px;
707
- min-height: 32px;
707
+ min-height: 42px;
708
708
  padding: 6px 8px;
709
709
  border-top: 1px solid #eee;
710
710
  letter-spacing: 1px;
@@ -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: 12px;
687
+ padding-top: 10px;
691
688
  margin: 0;
692
689
  }
693
690
  .lm_popover_table .lm_grid .ant-pagination .ant-select {
@@ -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
- (0, _react.useEffect)(function () {
244
- rowClick === null || rowClick === void 0 ? void 0 : rowClick();
245
- }, [useSelectedRows]); // 将节点方法给外部使用
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
- return setSelectedRows({
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) {
@@ -1062,3 +1062,10 @@ html {
1062
1062
  .lm_img_table .lm_card_cell_content:hover .card_cell_body .card_cell_checkbox {
1063
1063
  opacity: 1;
1064
1064
  }
1065
+ .lm_customCheck {
1066
+ position: absolute;
1067
+ bottom: 0;
1068
+ left: 0;
1069
+ max-width: 50%;
1070
+ font-size: 12px;
1071
+ }
@@ -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;
@@ -15,7 +15,6 @@
15
15
  list-style: none;
16
16
  }
17
17
  .lm-tabbar-list-item {
18
- height: 40px;
19
18
  display: flex;
20
19
  flex-direction: row;
21
20
  align-items: center;
@@ -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, (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));
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: 16px;
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")));
@@ -704,7 +704,7 @@ html {
704
704
  align-items: center;
705
705
  justify-content: space-between;
706
706
  font-size: 12px;
707
- min-height: 32px;
707
+ min-height: 42px;
708
708
  padding: 6px 8px;
709
709
  border-top: 1px solid #eee;
710
710
  letter-spacing: 1px;
@@ -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: 12px;
687
+ padding-top: 10px;
691
688
  margin: 0;
692
689
  }
693
690
  .lm_popover_table .lm_grid .ant-pagination .ant-select {
@@ -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
- (0, _react.useEffect)(function () {
244
- rowClick === null || rowClick === void 0 ? void 0 : rowClick();
245
- }, [useSelectedRows]); // 将节点方法给外部使用
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
- return setSelectedRows({
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) {
@@ -1062,3 +1062,10 @@ html {
1062
1062
  .lm_img_table .lm_card_cell_content:hover .card_cell_body .card_cell_checkbox {
1063
1063
  opacity: 1;
1064
1064
  }
1065
+ .lm_customCheck {
1066
+ position: absolute;
1067
+ bottom: 0;
1068
+ left: 0;
1069
+ max-width: 50%;
1070
+ font-size: 12px;
1071
+ }
@@ -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;
@@ -15,7 +15,6 @@
15
15
  list-style: none;
16
16
  }
17
17
  .lm-tabbar-list-item {
18
- height: 40px;
19
18
  display: flex;
20
19
  flex-direction: row;
21
20
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkmore-design",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "author": {
5
5
  "name": "nowthen",
6
6
  "email": "rnlvwyx@gmail.com"