@kmkf-fe-packages/basic-components 1.0.10-beta.16 → 1.0.10-beta.19

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
@@ -5,8 +5,8 @@ import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import { debounce, cloneDeep, difference, differenceWith } from 'lodash';
8
+ import { useUpdateEffect, useDebounceEffect } from 'ahooks';
8
9
  import zhCN from 'antd/lib/locale/zh_CN';
9
- import { useDebounceEffect } from 'ahooks';
10
10
  import pubsub from 'pubsub-js';
11
11
  import BigNumber from 'bignumber.js';
12
12
 
@@ -7648,7 +7648,7 @@ var WidgetMap = {
7648
7648
  INPUT: 'input',
7649
7649
  TEXTAREA: 'textarea'
7650
7650
  };
7651
- var pageSize = 10;
7651
+ var pageSize = 50;
7652
7652
  var SubForm = function SubForm(props) {
7653
7653
  var _selectOptions$;
7654
7654
  var value = props.value,
@@ -7660,8 +7660,7 @@ var SubForm = function SubForm(props) {
7660
7660
  flowTemplateKey = _props$subConfig.flowTemplateKey,
7661
7661
  nodeId = _props$subConfig.nodeId,
7662
7662
  workOrderTemplateId = _props$subConfig.workOrderTemplateId,
7663
- _props$look = props.look,
7664
- look = _props$look === void 0 ? false : _props$look;
7663
+ disabled = props.disabled;
7665
7664
  var ref = useRef(null);
7666
7665
  var _useState = useState(false),
7667
7666
  _useState2 = _slicedToArray(_useState, 2),
@@ -7687,6 +7686,7 @@ var SubForm = function SubForm(props) {
7687
7686
  _useState12 = _slicedToArray(_useState11, 2),
7688
7687
  hasMore = _useState12[0],
7689
7688
  setHasMore = _useState12[1];
7689
+ var firstIn = useRef(true);
7690
7690
  var updateHandle = function updateHandle(val, index, type) {
7691
7691
  if (value === null || value === void 0 ? void 0 : value.length) {
7692
7692
  var valueItem = config.find(function (t) {
@@ -7745,7 +7745,7 @@ var SubForm = function SubForm(props) {
7745
7745
  }) : /*#__PURE__*/React.createElement("div", null, val);
7746
7746
  }
7747
7747
  };
7748
- })), [{
7748
+ })), [disabled ? {} : {
7749
7749
  dataIndex: 'operation',
7750
7750
  title: '操作',
7751
7751
  width: 70,
@@ -7826,7 +7826,7 @@ var SubForm = function SubForm(props) {
7826
7826
  while (1) switch (_context.prev = _context.next) {
7827
7827
  case 0:
7828
7828
  _ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
7829
- if (!look) {
7829
+ if (!disabled) {
7830
7830
  _context.next = 3;
7831
7831
  break;
7832
7832
  }
@@ -7893,12 +7893,12 @@ var SubForm = function SubForm(props) {
7893
7893
  };
7894
7894
  }();
7895
7895
  useEffect(function () {
7896
- setPageNo(1);
7897
7896
  getWorkOrderList({
7898
7897
  pageNo: 1
7899
7898
  });
7900
7899
  }, []);
7901
- useEffect(function () {
7900
+ useUpdateEffect(function () {
7901
+ setPageNo(1);
7902
7902
  getWorkOrderList({
7903
7903
  pageNo: 1
7904
7904
  });
@@ -7910,13 +7910,13 @@ var SubForm = function SubForm(props) {
7910
7910
  setInputValue(val);
7911
7911
  setOpen(true);
7912
7912
  }, 1000), []);
7913
- return /*#__PURE__*/React.createElement(React.Fragment, null, !look && /*#__PURE__*/React.createElement(Space, {
7913
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && /*#__PURE__*/React.createElement(Space, {
7914
7914
  style: {
7915
7915
  marginBottom: '10px'
7916
7916
  }
7917
7917
  }, /*#__PURE__*/React.createElement(Select, {
7918
7918
  style: {
7919
- width: '100px'
7919
+ width: '120px'
7920
7920
  },
7921
7921
  options: selectOptions,
7922
7922
  defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
@@ -7945,7 +7945,8 @@ var SubForm = function SubForm(props) {
7945
7945
  },
7946
7946
  onRow: function onRow(record) {
7947
7947
  return {
7948
- onClick: function onClick() {
7948
+ onClick: function onClick(e) {
7949
+ e.stopPropagation();
7949
7950
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, record), {}, {
7950
7951
  uuid: uuid()
7951
7952
  })]));
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ var request = require('umi-request');
9
9
  var reactCopyToClipboard = require('react-copy-to-clipboard');
10
10
  var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
11
11
  var lodash = require('lodash');
12
- var zhCN = require('antd/lib/locale/zh_CN');
13
12
  var ahooks = require('ahooks');
13
+ var zhCN = require('antd/lib/locale/zh_CN');
14
14
  var pubsub = require('pubsub-js');
15
15
  var BigNumber = require('bignumber.js');
16
16
 
@@ -7660,7 +7660,7 @@ var WidgetMap = {
7660
7660
  INPUT: 'input',
7661
7661
  TEXTAREA: 'textarea'
7662
7662
  };
7663
- var pageSize = 10;
7663
+ var pageSize = 50;
7664
7664
  var SubForm = function SubForm(props) {
7665
7665
  var _selectOptions$;
7666
7666
  var value = props.value,
@@ -7672,8 +7672,7 @@ var SubForm = function SubForm(props) {
7672
7672
  flowTemplateKey = _props$subConfig.flowTemplateKey,
7673
7673
  nodeId = _props$subConfig.nodeId,
7674
7674
  workOrderTemplateId = _props$subConfig.workOrderTemplateId,
7675
- _props$look = props.look,
7676
- look = _props$look === void 0 ? false : _props$look;
7675
+ disabled = props.disabled;
7677
7676
  var ref = React.useRef(null);
7678
7677
  var _useState = React.useState(false),
7679
7678
  _useState2 = _slicedToArray(_useState, 2),
@@ -7699,6 +7698,7 @@ var SubForm = function SubForm(props) {
7699
7698
  _useState12 = _slicedToArray(_useState11, 2),
7700
7699
  hasMore = _useState12[0],
7701
7700
  setHasMore = _useState12[1];
7701
+ var firstIn = React.useRef(true);
7702
7702
  var updateHandle = function updateHandle(val, index, type) {
7703
7703
  if (value === null || value === void 0 ? void 0 : value.length) {
7704
7704
  var valueItem = config.find(function (t) {
@@ -7757,7 +7757,7 @@ var SubForm = function SubForm(props) {
7757
7757
  }) : /*#__PURE__*/React__default['default'].createElement("div", null, val);
7758
7758
  }
7759
7759
  };
7760
- })), [{
7760
+ })), [disabled ? {} : {
7761
7761
  dataIndex: 'operation',
7762
7762
  title: '操作',
7763
7763
  width: 70,
@@ -7838,7 +7838,7 @@ var SubForm = function SubForm(props) {
7838
7838
  while (1) switch (_context.prev = _context.next) {
7839
7839
  case 0:
7840
7840
  _ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
7841
- if (!look) {
7841
+ if (!disabled) {
7842
7842
  _context.next = 3;
7843
7843
  break;
7844
7844
  }
@@ -7905,12 +7905,12 @@ var SubForm = function SubForm(props) {
7905
7905
  };
7906
7906
  }();
7907
7907
  React.useEffect(function () {
7908
- setPageNo(1);
7909
7908
  getWorkOrderList({
7910
7909
  pageNo: 1
7911
7910
  });
7912
7911
  }, []);
7913
- React.useEffect(function () {
7912
+ ahooks.useUpdateEffect(function () {
7913
+ setPageNo(1);
7914
7914
  getWorkOrderList({
7915
7915
  pageNo: 1
7916
7916
  });
@@ -7922,13 +7922,13 @@ var SubForm = function SubForm(props) {
7922
7922
  setInputValue(val);
7923
7923
  setOpen(true);
7924
7924
  }, 1000), []);
7925
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !look && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
7925
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
7926
7926
  style: {
7927
7927
  marginBottom: '10px'
7928
7928
  }
7929
7929
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
7930
7930
  style: {
7931
- width: '100px'
7931
+ width: '120px'
7932
7932
  },
7933
7933
  options: selectOptions,
7934
7934
  defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
@@ -7957,7 +7957,8 @@ var SubForm = function SubForm(props) {
7957
7957
  },
7958
7958
  onRow: function onRow(record) {
7959
7959
  return {
7960
- onClick: function onClick() {
7960
+ onClick: function onClick(e) {
7961
+ e.stopPropagation();
7961
7962
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, record), {}, {
7962
7963
  uuid: kmkfUtils.uuid()
7963
7964
  })]));
@@ -21,7 +21,7 @@ type SubFormProps = {
21
21
  nodeId: string;
22
22
  workOrderTemplateId: string;
23
23
  };
24
- look: boolean;
24
+ disabled: boolean;
25
25
  };
26
26
  declare const SubForm: (props: SubFormProps) => React.JSX.Element;
27
27
  export default SubForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "1.0.10-beta.16",
3
+ "version": "1.0.10-beta.19",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.15",
23
+ "@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.17",
24
24
  "ahooks": "^3.7.4",
25
25
  "bignumber.js": "^9.1.2",
26
26
  "kmkf-monitor": "^0.8.8",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "8ae15fe2d1ec963b5da2602cf4ffd08d902bda6a"
68
+ "gitHead": "8b1a9d888cd263d5a6f3b868b1d28b9c39f7d235"
69
69
  }