@kmkf-fe-packages/basic-components 0.13.0-alpha.3 → 0.13.0-beta.10

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
@@ -618,7 +618,7 @@ var ApaasUpload = function ApaasUpload(_ref) {
618
618
  _ref$accept = _ref.accept,
619
619
  accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
620
620
  _ref$canPreview = _ref.canPreview,
621
- canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
621
+ canPreview = _ref$canPreview === void 0 ? false : _ref$canPreview,
622
622
  _ref$disabled = _ref.disabled,
623
623
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
624
624
  resetProps = _objectWithoutProperties(_ref, _excluded$4);
@@ -789,7 +789,7 @@ var ApaasUpload = function ApaasUpload(_ref) {
789
789
  className: styles.upload,
790
790
  beforeUpload: beforeUpload
791
791
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
792
- className: "addBtn"
792
+ className: 'addBtn'
793
793
  }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText))), /*#__PURE__*/React.createElement(Image, {
794
794
  width: 0,
795
795
  style: {
@@ -913,7 +913,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
913
913
  _ref$accept = _ref.accept,
914
914
  accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
915
915
  _ref$canPreview = _ref.canPreview,
916
- canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
916
+ canPreview = _ref$canPreview === void 0 ? false : _ref$canPreview,
917
917
  _ref$disabled = _ref.disabled,
918
918
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
919
919
  uniqueKey = _ref.uniqueKey,
@@ -6853,12 +6853,12 @@ hooks.HTML5_FMT = {
6853
6853
  MONTH: 'YYYY-MM', // <input type="month" />
6854
6854
  };
6855
6855
 
6856
- var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "hostUrl", "canDownload", "actionUrl", "platform"];
6856
+ var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "canDownload", "actionUrl", "platform"];
6857
6857
  var Dragger = Upload.Dragger;
6858
6858
  var fn$2 = function fn() {
6859
6859
  return void 0;
6860
6860
  };
6861
- var ApaasUploadFile = function ApaasUploadFile(_ref) {
6861
+ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6862
6862
  var _ref$maxCount = _ref.maxCount,
6863
6863
  maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
6864
6864
  _ref$maxSize = _ref.maxSize,
@@ -6871,6 +6871,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6871
6871
  accept = _ref$accept === void 0 ? '' : _ref$accept,
6872
6872
  _ref$disabled = _ref.disabled,
6873
6873
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
6874
+ uniqueKey = _ref.uniqueKey,
6874
6875
  _ref$hostUrl = _ref.hostUrl,
6875
6876
  hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
6876
6877
  _ref$canDownload = _ref.canDownload,
@@ -6896,6 +6897,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6896
6897
  _useState8 = _slicedToArray(_useState7, 2),
6897
6898
  fileName = _useState8[0],
6898
6899
  setFileName = _useState8[1];
6900
+ // const [blackList, setBlackList] = useState<any>({});
6899
6901
  var valueRef = useRef(value);
6900
6902
  var _useState9 = useState(false),
6901
6903
  _useState10 = _slicedToArray(_useState9, 2),
@@ -6908,11 +6910,16 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6908
6910
  var fileList = useMemo(function () {
6909
6911
  return value.map(function (t, i) {
6910
6912
  return _objectSpread2(_objectSpread2({}, t), {}, {
6913
+ // status: 'success',
6911
6914
  percent: 100,
6912
6915
  uid: i + ''
6916
+ // name: ,
6913
6917
  });
6914
6918
  });
6915
6919
  }, [value]);
6920
+ // useEffect(() => {
6921
+ // getVideoBlack();
6922
+ // }, []);
6916
6923
  useEffect(function () {
6917
6924
  valueRef.current = value;
6918
6925
  }, [value]);
@@ -6932,6 +6939,20 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6932
6939
  });
6933
6940
  };
6934
6941
  }, [pasteDefaultStates]);
6942
+ //获取视频上传黑名单
6943
+ // const getVideoBlack = async () => {
6944
+ // request('/qy/diamond/getConfigInfo', {
6945
+ // method: 'get',
6946
+ // params: {
6947
+ // key: 'video-upload-code',
6948
+ // name: 'getConfigInfo',
6949
+ // },
6950
+ // }).then((res) => {
6951
+ // if (res.success && res.data) {
6952
+ // setBlackList(JSON.parse(res.data));
6953
+ // }
6954
+ // });
6955
+ // };
6935
6956
  var asyncUpload = /*#__PURE__*/function () {
6936
6957
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
6937
6958
  var formData, fileName, _yield$request, success, data;
@@ -6998,9 +7019,46 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6998
7019
  valueRef.current = list;
6999
7020
  onChange(list);
7000
7021
  };
7022
+ // const verificationFormat = async (file: any) => {
7023
+ // //飞鸽端不支持worker没有办法使用react-mediainfo插件
7024
+ // if (platform !== 'fxg') {
7025
+ // const { getInfo } = await require('react-mediainfo');
7026
+ // getInfo(file).then((res: any) => {
7027
+ // const {
7028
+ // media: { track },
7029
+ // } = res;
7030
+ // console.log(res);
7031
+ // const videoItem = track.find((item: any) => item['@type'] === 'Video');
7032
+ // const generalItem = track.find(
7033
+ // (item: any) => item['@type'] === 'General',
7034
+ // );
7035
+ // if (
7036
+ // videoItem &&
7037
+ // blackList[generalItem?.Format.toUpperCase()] &&
7038
+ // blackList[generalItem?.Format.toUpperCase()].includes(
7039
+ // videoItem?.Format.toUpperCase(),
7040
+ // )
7041
+ // ) {
7042
+ // Modal.confirm({
7043
+ // title: '提示',
7044
+ // content: '上传的视频可能无法播放,确认要上传吗?',
7045
+ // okText: '确定',
7046
+ // cancelText: '取消',
7047
+ // onOk: () => {
7048
+ // asyncUpload(file);
7049
+ // },
7050
+ // });
7051
+ // } else {
7052
+ // asyncUpload(file);
7053
+ // }
7054
+ // });
7055
+ // } else {
7056
+ // asyncUpload(file);
7057
+ // }
7058
+ // };
7001
7059
  // 手动上传模式, 一直返回false
7002
7060
  var beforeUpload = function beforeUpload(file) {
7003
- // console.log('beforeUpload', file);
7061
+ console.log('beforeUpload', file);
7004
7062
  var size = file.size / 1024 / 1024 < maxSize;
7005
7063
  if (value.length >= maxCount) {
7006
7064
  message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
@@ -7010,6 +7068,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
7010
7068
  message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
7011
7069
  return Upload.LIST_IGNORE;
7012
7070
  }
7071
+ // verificationFormat(file);
7013
7072
  asyncUpload(file);
7014
7073
  return Upload.LIST_IGNORE;
7015
7074
  };
@@ -11772,7 +11831,7 @@ function CommonStatus(props) {
11772
11831
  reason: failValue === val ? '' : value === null || value === void 0 ? void 0 : value.reason
11773
11832
  });
11774
11833
  };
11775
- return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
11834
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
11776
11835
  showSearch: true,
11777
11836
  value: value === null || value === void 0 ? void 0 : value.status,
11778
11837
  filterOption: function filterOption(input, option) {
@@ -11780,7 +11839,9 @@ function CommonStatus(props) {
11780
11839
  }
11781
11840
  }, other), {}, {
11782
11841
  onChange: changeHandle
11783
- }));
11842
+ })), (value === null || value === void 0 ? void 0 : value.reason) ? /*#__PURE__*/React.createElement("div", {
11843
+ className: "c-red"
11844
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : value.reason) : null);
11784
11845
  }
11785
11846
 
11786
11847
  var CommonSystemOrder = function CommonSystemOrder(props) {
@@ -11806,7 +11867,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
11806
11867
  maxHeight: '300px',
11807
11868
  overflowY: 'auto'
11808
11869
  }
11809
- }, type === 1 ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11870
+ }, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11810
11871
  };
11811
11872
  var changeInputHandle = function changeInputHandle(val, type) {
11812
11873
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
@@ -11855,20 +11916,20 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
11855
11916
  onChange: function onChange(e) {
11856
11917
  return changeInputHandle(e.target.value, 'reissueTradeId');
11857
11918
  },
11858
- value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reissueTradeId
11919
+ value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
11859
11920
  })) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
11860
11921
  disabled: true,
11861
11922
  placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
11862
11923
  onChange: function onChange(e) {
11863
11924
  return changeInputHandle(e.target.value, 'exchangeTradeId');
11864
11925
  },
11865
- value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.reissueTradeId
11926
+ value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
11866
11927
  })) : null) : null);
11867
11928
  };
11868
11929
 
11869
11930
  var _excluded$h = ["value", "onChange", "disabled", "failValue", "type"];
11870
11931
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11871
- var _value$changeIndex;
11932
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
11872
11933
  var _props$value = props.value,
11873
11934
  value = _props$value === void 0 ? [] : _props$value,
11874
11935
  onChange = props.onChange,
@@ -11892,7 +11953,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11892
11953
  maxHeight: '300px',
11893
11954
  overflowY: 'auto'
11894
11955
  }
11895
- }, type === 1 ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11956
+ }, [1, 2].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11896
11957
  };
11897
11958
  var changeHandle = function changeHandle(val, valType) {
11898
11959
  console.log(val, valType);
@@ -11938,7 +11999,9 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11938
11999
  onChange: function onChange(val) {
11939
12000
  return changeHandle(val, 'status');
11940
12001
  }
11941
- })))) : null);
12002
+ }))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React.createElement("div", {
12003
+ className: "c-red"
12004
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
11942
12005
  };
11943
12006
 
11944
12007
  var CalculationInput = function CalculationInput(props) {
@@ -11959,4 +12022,4 @@ var CalculationInput = function CalculationInput(props) {
11959
12022
  }, config === null || config === void 0 ? void 0 : config.unit));
11960
12023
  };
11961
12024
 
11962
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
12025
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadAsync$1 as ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
package/dist/index.js CHANGED
@@ -629,7 +629,7 @@ var ApaasUpload = function ApaasUpload(_ref) {
629
629
  _ref$accept = _ref.accept,
630
630
  accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
631
631
  _ref$canPreview = _ref.canPreview,
632
- canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
632
+ canPreview = _ref$canPreview === void 0 ? false : _ref$canPreview,
633
633
  _ref$disabled = _ref.disabled,
634
634
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
635
635
  resetProps = _objectWithoutProperties(_ref, _excluded$4);
@@ -800,7 +800,7 @@ var ApaasUpload = function ApaasUpload(_ref) {
800
800
  className: styles.upload,
801
801
  beforeUpload: beforeUpload
802
802
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("span", {
803
- className: "addBtn"
803
+ className: 'addBtn'
804
804
  }, "+"), /*#__PURE__*/React__default['default'].createElement("div", null, uploadText))), /*#__PURE__*/React__default['default'].createElement(antd.Image, {
805
805
  width: 0,
806
806
  style: {
@@ -924,7 +924,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
924
924
  _ref$accept = _ref.accept,
925
925
  accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
926
926
  _ref$canPreview = _ref.canPreview,
927
- canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
927
+ canPreview = _ref$canPreview === void 0 ? false : _ref$canPreview,
928
928
  _ref$disabled = _ref.disabled,
929
929
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
930
930
  uniqueKey = _ref.uniqueKey,
@@ -6864,12 +6864,12 @@ hooks.HTML5_FMT = {
6864
6864
  MONTH: 'YYYY-MM', // <input type="month" />
6865
6865
  };
6866
6866
 
6867
- var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "hostUrl", "canDownload", "actionUrl", "platform"];
6867
+ var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "canDownload", "actionUrl", "platform"];
6868
6868
  var Dragger = antd.Upload.Dragger;
6869
6869
  var fn$2 = function fn() {
6870
6870
  return void 0;
6871
6871
  };
6872
- var ApaasUploadFile = function ApaasUploadFile(_ref) {
6872
+ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6873
6873
  var _ref$maxCount = _ref.maxCount,
6874
6874
  maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
6875
6875
  _ref$maxSize = _ref.maxSize,
@@ -6882,6 +6882,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6882
6882
  accept = _ref$accept === void 0 ? '' : _ref$accept,
6883
6883
  _ref$disabled = _ref.disabled,
6884
6884
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
6885
+ uniqueKey = _ref.uniqueKey,
6885
6886
  _ref$hostUrl = _ref.hostUrl,
6886
6887
  hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
6887
6888
  _ref$canDownload = _ref.canDownload,
@@ -6907,6 +6908,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6907
6908
  _useState8 = _slicedToArray(_useState7, 2),
6908
6909
  fileName = _useState8[0],
6909
6910
  setFileName = _useState8[1];
6911
+ // const [blackList, setBlackList] = useState<any>({});
6910
6912
  var valueRef = React.useRef(value);
6911
6913
  var _useState9 = React.useState(false),
6912
6914
  _useState10 = _slicedToArray(_useState9, 2),
@@ -6919,11 +6921,16 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6919
6921
  var fileList = React.useMemo(function () {
6920
6922
  return value.map(function (t, i) {
6921
6923
  return _objectSpread2(_objectSpread2({}, t), {}, {
6924
+ // status: 'success',
6922
6925
  percent: 100,
6923
6926
  uid: i + ''
6927
+ // name: ,
6924
6928
  });
6925
6929
  });
6926
6930
  }, [value]);
6931
+ // useEffect(() => {
6932
+ // getVideoBlack();
6933
+ // }, []);
6927
6934
  React.useEffect(function () {
6928
6935
  valueRef.current = value;
6929
6936
  }, [value]);
@@ -6943,6 +6950,20 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
6943
6950
  });
6944
6951
  };
6945
6952
  }, [pasteDefaultStates]);
6953
+ //获取视频上传黑名单
6954
+ // const getVideoBlack = async () => {
6955
+ // request('/qy/diamond/getConfigInfo', {
6956
+ // method: 'get',
6957
+ // params: {
6958
+ // key: 'video-upload-code',
6959
+ // name: 'getConfigInfo',
6960
+ // },
6961
+ // }).then((res) => {
6962
+ // if (res.success && res.data) {
6963
+ // setBlackList(JSON.parse(res.data));
6964
+ // }
6965
+ // });
6966
+ // };
6946
6967
  var asyncUpload = /*#__PURE__*/function () {
6947
6968
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
6948
6969
  var formData, fileName, _yield$request, success, data;
@@ -7009,9 +7030,46 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
7009
7030
  valueRef.current = list;
7010
7031
  onChange(list);
7011
7032
  };
7033
+ // const verificationFormat = async (file: any) => {
7034
+ // //飞鸽端不支持worker没有办法使用react-mediainfo插件
7035
+ // if (platform !== 'fxg') {
7036
+ // const { getInfo } = await require('react-mediainfo');
7037
+ // getInfo(file).then((res: any) => {
7038
+ // const {
7039
+ // media: { track },
7040
+ // } = res;
7041
+ // console.log(res);
7042
+ // const videoItem = track.find((item: any) => item['@type'] === 'Video');
7043
+ // const generalItem = track.find(
7044
+ // (item: any) => item['@type'] === 'General',
7045
+ // );
7046
+ // if (
7047
+ // videoItem &&
7048
+ // blackList[generalItem?.Format.toUpperCase()] &&
7049
+ // blackList[generalItem?.Format.toUpperCase()].includes(
7050
+ // videoItem?.Format.toUpperCase(),
7051
+ // )
7052
+ // ) {
7053
+ // Modal.confirm({
7054
+ // title: '提示',
7055
+ // content: '上传的视频可能无法播放,确认要上传吗?',
7056
+ // okText: '确定',
7057
+ // cancelText: '取消',
7058
+ // onOk: () => {
7059
+ // asyncUpload(file);
7060
+ // },
7061
+ // });
7062
+ // } else {
7063
+ // asyncUpload(file);
7064
+ // }
7065
+ // });
7066
+ // } else {
7067
+ // asyncUpload(file);
7068
+ // }
7069
+ // };
7012
7070
  // 手动上传模式, 一直返回false
7013
7071
  var beforeUpload = function beforeUpload(file) {
7014
- // console.log('beforeUpload', file);
7072
+ console.log('beforeUpload', file);
7015
7073
  var size = file.size / 1024 / 1024 < maxSize;
7016
7074
  if (value.length >= maxCount) {
7017
7075
  antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
@@ -7021,6 +7079,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
7021
7079
  antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
7022
7080
  return antd.Upload.LIST_IGNORE;
7023
7081
  }
7082
+ // verificationFormat(file);
7024
7083
  asyncUpload(file);
7025
7084
  return antd.Upload.LIST_IGNORE;
7026
7085
  };
@@ -11783,7 +11842,7 @@ function CommonStatus(props) {
11783
11842
  reason: failValue === val ? '' : value === null || value === void 0 ? void 0 : value.reason
11784
11843
  });
11785
11844
  };
11786
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
11845
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
11787
11846
  showSearch: true,
11788
11847
  value: value === null || value === void 0 ? void 0 : value.status,
11789
11848
  filterOption: function filterOption(input, option) {
@@ -11791,7 +11850,9 @@ function CommonStatus(props) {
11791
11850
  }
11792
11851
  }, other), {}, {
11793
11852
  onChange: changeHandle
11794
- }));
11853
+ })), (value === null || value === void 0 ? void 0 : value.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
11854
+ className: "c-red"
11855
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : value.reason) : null);
11795
11856
  }
11796
11857
 
11797
11858
  var CommonSystemOrder = function CommonSystemOrder(props) {
@@ -11817,7 +11878,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
11817
11878
  maxHeight: '300px',
11818
11879
  overflowY: 'auto'
11819
11880
  }
11820
- }, type === 1 ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11881
+ }, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11821
11882
  };
11822
11883
  var changeInputHandle = function changeInputHandle(val, type) {
11823
11884
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
@@ -11866,20 +11927,20 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
11866
11927
  onChange: function onChange(e) {
11867
11928
  return changeInputHandle(e.target.value, 'reissueTradeId');
11868
11929
  },
11869
- value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reissueTradeId
11930
+ value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
11870
11931
  })) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11871
11932
  disabled: true,
11872
11933
  placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
11873
11934
  onChange: function onChange(e) {
11874
11935
  return changeInputHandle(e.target.value, 'exchangeTradeId');
11875
11936
  },
11876
- value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.reissueTradeId
11937
+ value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
11877
11938
  })) : null) : null);
11878
11939
  };
11879
11940
 
11880
11941
  var _excluded$h = ["value", "onChange", "disabled", "failValue", "type"];
11881
11942
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11882
- var _value$changeIndex;
11943
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
11883
11944
  var _props$value = props.value,
11884
11945
  value = _props$value === void 0 ? [] : _props$value,
11885
11946
  onChange = props.onChange,
@@ -11903,7 +11964,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11903
11964
  maxHeight: '300px',
11904
11965
  overflowY: 'auto'
11905
11966
  }
11906
- }, type === 1 ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11967
+ }, [1, 2].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11907
11968
  };
11908
11969
  var changeHandle = function changeHandle(val, valType) {
11909
11970
  console.log(val, valType);
@@ -11949,7 +12010,9 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11949
12010
  onChange: function onChange(val) {
11950
12011
  return changeHandle(val, 'status');
11951
12012
  }
11952
- })))) : null);
12013
+ }))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
12014
+ className: "c-red"
12015
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
11953
12016
  };
11954
12017
 
11955
12018
  var CalculationInput = function CalculationInput(props) {
@@ -11989,7 +12052,7 @@ exports.ApaasSlider = ApaasSlider;
11989
12052
  exports.ApaasTextArea = ApaasTextArea;
11990
12053
  exports.ApaasUpload = ApaasUpload;
11991
12054
  exports.ApaasUploadAsync = ApaasUploadAsync;
11992
- exports.ApaasUploadFile = ApaasUploadFile;
12055
+ exports.ApaasUploadFile = ApaasUploadAsync$1;
11993
12056
  exports.BsExchange = BsExchange;
11994
12057
  exports.BsGoods = BsGoods;
11995
12058
  exports.BsReissue = BsReissue;
@@ -8,13 +8,15 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
8
8
  maxCount?: number;
9
9
  maxSize?: number;
10
10
  uploadText?: string;
11
+ canPreview?: boolean;
11
12
  disabled?: boolean;
12
13
  onChange?: (value: UploadValue) => void;
13
14
  value?: UploadValue;
15
+ uniqueKey?: string;
14
16
  hostUrl?: string;
15
17
  actionUrl?: string;
16
18
  platform?: string;
17
19
  canDownload?: boolean;
18
20
  }
19
- declare const ApaasUploadFile: ({ maxCount, maxSize, onChange, value, accept, disabled, hostUrl, canDownload, actionUrl, platform, ...resetProps }: ApaasUploadProps) => React.JSX.Element;
20
- export default ApaasUploadFile;
21
+ declare const ApaasUploadAsync: ({ maxCount, maxSize, onChange, value, accept, disabled, uniqueKey, hostUrl, canDownload, actionUrl, platform, ...resetProps }: ApaasUploadProps) => React.JSX.Element;
22
+ export default ApaasUploadAsync;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.13.0-alpha.3",
3
+ "version": "0.13.0-beta.10",
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": "^0.13.0-alpha.3",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.13.0-beta.10",
24
24
  "lodash": "^4.17.21",
25
25
  "pubsub-js": "^1.9.4",
26
26
  "react-copy-to-clipboard": "^5.1.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "324ac5eec7deb67c75a650e7594e01ff9effe72e"
64
+ "gitHead": "d529e86c1d5e033d9845c7d425b400e4dada045a"
65
65
  }