@kmkf-fe-packages/basic-components 2.5.0-rc.0 → 2.7.0-rc.0

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.esm.js CHANGED
@@ -19493,7 +19493,8 @@ var OrderSubForm = function OrderSubForm(props) {
19493
19493
  onChange = props.onChange,
19494
19494
  _props$tableHeader = props.tableHeader,
19495
19495
  tableHeader = _props$tableHeader === void 0 ? [] : _props$tableHeader,
19496
- disabled = props.disabled,
19496
+ _props$disabled = props.disabled,
19497
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
19497
19498
  maxCount = props.maxCount,
19498
19499
  manual = props.manual,
19499
19500
  correlationList = props.subConfig.correlationList,
@@ -19542,7 +19543,7 @@ var OrderSubForm = function OrderSubForm(props) {
19542
19543
  isShow: true,
19543
19544
  isEdit: false,
19544
19545
  isRequired: false,
19545
- width: Number(next === null || next === void 0 ? void 0 : next.width) || 150
19546
+ width: (next === null || next === void 0 ? void 0 : next.width) ? Number(next === null || next === void 0 ? void 0 : next.width) : 150
19546
19547
  };
19547
19548
  if (t && t.isShow) {
19548
19549
  prv.push(_objectSpread2(_objectSpread2(_objectSpread2({}, next), t), {}, {
@@ -19553,10 +19554,11 @@ var OrderSubForm = function OrderSubForm(props) {
19553
19554
  }, []);
19554
19555
  }, [orderSubformColumns, tableHeader]);
19555
19556
  var column = useMemo(function () {
19556
- return [{
19557
+ var list = [{
19557
19558
  dataIndex: 'index',
19558
19559
  title: '序号',
19559
19560
  width: 80,
19561
+ ellipsis: true,
19560
19562
  render: function render(val, record, index) {
19561
19563
  return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
19562
19564
  index: index,
@@ -19565,17 +19567,17 @@ var OrderSubForm = function OrderSubForm(props) {
19565
19567
  return deleteHandle(record.uuid);
19566
19568
  }
19567
19569
  });
19568
- // return <div style={{ width: 25 }}>{index + 1}</div>;
19569
19570
  }
19570
19571
  }].concat(_toConsumableArray(newTableHeader.map(function (t) {
19571
19572
  return _objectSpread2(_objectSpread2({}, t), {}, {
19573
+ ellipsis: true,
19572
19574
  dataIndex: t === null || t === void 0 ? void 0 : t.dataIndex,
19573
19575
  title: /*#__PURE__*/React.createElement("span", null, t.isRequired ? /*#__PURE__*/React.createElement("span", {
19574
19576
  style: {
19575
19577
  color: 'red'
19576
19578
  }
19577
19579
  }, "*") : null, (t === null || t === void 0 ? void 0 : t.settingName) || t.title),
19578
- width: Number(t.width),
19580
+ width: (t === null || t === void 0 ? void 0 : t.width) ? Number(t === null || t === void 0 ? void 0 : t.width) : 150,
19579
19581
  render: function render(val, record, index) {
19580
19582
  // const column = orderSubformColumnMap[t.dataIndex];
19581
19583
  var isDisabled = t.isEdit || disabled;
@@ -19589,35 +19591,40 @@ var OrderSubForm = function OrderSubForm(props) {
19589
19591
  });
19590
19592
  }
19591
19593
  });
19592
- })), [disabled ? {} : {
19593
- dataIndex: 'operation',
19594
- title: '操作',
19595
- width: 70,
19596
- fixed: 'right',
19597
- render: function render(val, record, index) {
19598
- return /*#__PURE__*/React.createElement(Space, null, manual && /*#__PURE__*/React.createElement(Tooltip, {
19599
- title: "\u6DFB\u52A0"
19600
- }, /*#__PURE__*/React.createElement(PlusCircleFilled, {
19601
- style: {
19602
- fontSize: 18,
19603
- color: '#1890ff'
19604
- },
19605
- onClick: function onClick() {
19606
- return addHandle(index + 1);
19607
- }
19608
- })), /*#__PURE__*/React.createElement(Tooltip, {
19609
- title: "\u5220\u9664"
19610
- }, /*#__PURE__*/React.createElement(MinusCircleFilled, {
19611
- style: {
19612
- fontSize: 18
19613
- },
19614
- onClick: function onClick() {
19615
- return deleteHandle(record.uuid);
19616
- }
19617
- })));
19618
- }
19619
- }]);
19594
+ })));
19595
+ if (!disabled) {
19596
+ list.push({
19597
+ dataIndex: 'operation',
19598
+ title: '操作',
19599
+ width: 70,
19600
+ fixed: 'right',
19601
+ render: function render(val, record, index) {
19602
+ return /*#__PURE__*/React.createElement(Space, null, manual && /*#__PURE__*/React.createElement(Tooltip, {
19603
+ title: "\u6DFB\u52A0"
19604
+ }, /*#__PURE__*/React.createElement(PlusCircleFilled, {
19605
+ style: {
19606
+ fontSize: 18,
19607
+ color: '#1890ff'
19608
+ },
19609
+ onClick: function onClick() {
19610
+ return addHandle(index + 1);
19611
+ }
19612
+ })), /*#__PURE__*/React.createElement(Tooltip, {
19613
+ title: "\u5220\u9664"
19614
+ }, /*#__PURE__*/React.createElement(MinusCircleFilled, {
19615
+ style: {
19616
+ fontSize: 18
19617
+ },
19618
+ onClick: function onClick() {
19619
+ return deleteHandle(record.uuid);
19620
+ }
19621
+ })));
19622
+ }
19623
+ });
19624
+ }
19625
+ return list;
19620
19626
  }, [newTableHeader, disabled, updateHandle]);
19627
+ console.log('column', column);
19621
19628
  var orderModalColumns = useMemo(function () {
19622
19629
  return [{
19623
19630
  dataIndex: '',
@@ -19727,8 +19734,9 @@ var OrderSubForm = function OrderSubForm(props) {
19727
19734
  rowKey: 'uuid',
19728
19735
  size: "small",
19729
19736
  pagination: false,
19737
+ tableLayout: "fixed",
19730
19738
  scroll: {
19731
- x: '100%'
19739
+ x: 'max-content'
19732
19740
  },
19733
19741
  locale: {
19734
19742
  emptyText: !disabled && manual ? /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E,", /*#__PURE__*/React.createElement(Button, {
package/dist/index.js CHANGED
@@ -19505,7 +19505,8 @@ var OrderSubForm = function OrderSubForm(props) {
19505
19505
  onChange = props.onChange,
19506
19506
  _props$tableHeader = props.tableHeader,
19507
19507
  tableHeader = _props$tableHeader === void 0 ? [] : _props$tableHeader,
19508
- disabled = props.disabled,
19508
+ _props$disabled = props.disabled,
19509
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
19509
19510
  maxCount = props.maxCount,
19510
19511
  manual = props.manual,
19511
19512
  correlationList = props.subConfig.correlationList,
@@ -19554,7 +19555,7 @@ var OrderSubForm = function OrderSubForm(props) {
19554
19555
  isShow: true,
19555
19556
  isEdit: false,
19556
19557
  isRequired: false,
19557
- width: Number(next === null || next === void 0 ? void 0 : next.width) || 150
19558
+ width: (next === null || next === void 0 ? void 0 : next.width) ? Number(next === null || next === void 0 ? void 0 : next.width) : 150
19558
19559
  };
19559
19560
  if (t && t.isShow) {
19560
19561
  prv.push(_objectSpread2(_objectSpread2(_objectSpread2({}, next), t), {}, {
@@ -19565,10 +19566,11 @@ var OrderSubForm = function OrderSubForm(props) {
19565
19566
  }, []);
19566
19567
  }, [orderSubformColumns, tableHeader]);
19567
19568
  var column = React.useMemo(function () {
19568
- return [{
19569
+ var list = [{
19569
19570
  dataIndex: 'index',
19570
19571
  title: '序号',
19571
19572
  width: 80,
19573
+ ellipsis: true,
19572
19574
  render: function render(val, record, index) {
19573
19575
  return /*#__PURE__*/React__default['default'].createElement(HoverTableRowDeleteIcon, {
19574
19576
  index: index,
@@ -19577,17 +19579,17 @@ var OrderSubForm = function OrderSubForm(props) {
19577
19579
  return deleteHandle(record.uuid);
19578
19580
  }
19579
19581
  });
19580
- // return <div style={{ width: 25 }}>{index + 1}</div>;
19581
19582
  }
19582
19583
  }].concat(_toConsumableArray(newTableHeader.map(function (t) {
19583
19584
  return _objectSpread2(_objectSpread2({}, t), {}, {
19585
+ ellipsis: true,
19584
19586
  dataIndex: t === null || t === void 0 ? void 0 : t.dataIndex,
19585
19587
  title: /*#__PURE__*/React__default['default'].createElement("span", null, t.isRequired ? /*#__PURE__*/React__default['default'].createElement("span", {
19586
19588
  style: {
19587
19589
  color: 'red'
19588
19590
  }
19589
19591
  }, "*") : null, (t === null || t === void 0 ? void 0 : t.settingName) || t.title),
19590
- width: Number(t.width),
19592
+ width: (t === null || t === void 0 ? void 0 : t.width) ? Number(t === null || t === void 0 ? void 0 : t.width) : 150,
19591
19593
  render: function render(val, record, index) {
19592
19594
  // const column = orderSubformColumnMap[t.dataIndex];
19593
19595
  var isDisabled = t.isEdit || disabled;
@@ -19601,35 +19603,40 @@ var OrderSubForm = function OrderSubForm(props) {
19601
19603
  });
19602
19604
  }
19603
19605
  });
19604
- })), [disabled ? {} : {
19605
- dataIndex: 'operation',
19606
- title: '操作',
19607
- width: 70,
19608
- fixed: 'right',
19609
- render: function render(val, record, index) {
19610
- return /*#__PURE__*/React__default['default'].createElement(antd.Space, null, manual && /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
19611
- title: "\u6DFB\u52A0"
19612
- }, /*#__PURE__*/React__default['default'].createElement(icons.PlusCircleFilled, {
19613
- style: {
19614
- fontSize: 18,
19615
- color: '#1890ff'
19616
- },
19617
- onClick: function onClick() {
19618
- return addHandle(index + 1);
19619
- }
19620
- })), /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
19621
- title: "\u5220\u9664"
19622
- }, /*#__PURE__*/React__default['default'].createElement(icons.MinusCircleFilled, {
19623
- style: {
19624
- fontSize: 18
19625
- },
19626
- onClick: function onClick() {
19627
- return deleteHandle(record.uuid);
19628
- }
19629
- })));
19630
- }
19631
- }]);
19606
+ })));
19607
+ if (!disabled) {
19608
+ list.push({
19609
+ dataIndex: 'operation',
19610
+ title: '操作',
19611
+ width: 70,
19612
+ fixed: 'right',
19613
+ render: function render(val, record, index) {
19614
+ return /*#__PURE__*/React__default['default'].createElement(antd.Space, null, manual && /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
19615
+ title: "\u6DFB\u52A0"
19616
+ }, /*#__PURE__*/React__default['default'].createElement(icons.PlusCircleFilled, {
19617
+ style: {
19618
+ fontSize: 18,
19619
+ color: '#1890ff'
19620
+ },
19621
+ onClick: function onClick() {
19622
+ return addHandle(index + 1);
19623
+ }
19624
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
19625
+ title: "\u5220\u9664"
19626
+ }, /*#__PURE__*/React__default['default'].createElement(icons.MinusCircleFilled, {
19627
+ style: {
19628
+ fontSize: 18
19629
+ },
19630
+ onClick: function onClick() {
19631
+ return deleteHandle(record.uuid);
19632
+ }
19633
+ })));
19634
+ }
19635
+ });
19636
+ }
19637
+ return list;
19632
19638
  }, [newTableHeader, disabled, updateHandle]);
19639
+ console.log('column', column);
19633
19640
  var orderModalColumns = React.useMemo(function () {
19634
19641
  return [{
19635
19642
  dataIndex: '',
@@ -19739,8 +19746,9 @@ var OrderSubForm = function OrderSubForm(props) {
19739
19746
  rowKey: 'uuid',
19740
19747
  size: "small",
19741
19748
  pagination: false,
19749
+ tableLayout: "fixed",
19742
19750
  scroll: {
19743
- x: '100%'
19751
+ x: 'max-content'
19744
19752
  },
19745
19753
  locale: {
19746
19754
  emptyText: !disabled && manual ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u6682\u65E0\u6570\u636E,", /*#__PURE__*/React__default['default'].createElement(antd.Button, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.5.0-rc.0",
3
+ "version": "2.7.0-rc.0",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "dd823f96804157434b7aee9febe5b37f9ab6bea7"
68
+ "gitHead": "37a143fed0f8a760f5821f1609a2c86ab7d98286"
69
69
  }