@kmkf-fe-packages/basic-components 1.6.0-beta.10 → 1.6.0-beta.13

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
@@ -9116,7 +9116,7 @@ var Goods = function Goods(props) {
9116
9116
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
9117
9117
  setVisible(false);
9118
9118
  //供应上编码组件 || 商品组件且可以选择sku
9119
- if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && isTaobaoPlat && list.length > 0)) {
9119
+ if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && list.length > 0)) {
9120
9120
  _context2.next = 12;
9121
9121
  break;
9122
9122
  }
@@ -9128,12 +9128,12 @@ var Goods = function Goods(props) {
9128
9128
  case 9:
9129
9129
  _yield$querySkus = _context2.sent;
9130
9130
  data = _yield$querySkus.data;
9131
- if (data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9131
+ if (data && data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9132
9132
  options = data[0]['skus'].map(function (item) {
9133
9133
  return {
9134
- label: item.propertiesName.split(';').map(function (i) {
9134
+ label: isTaobaoPlat ? item.propertiesName.split(';').map(function (i) {
9135
9135
  return i.split(':').slice(2);
9136
- }).join(';'),
9136
+ }).join(';') : item.propertiesName,
9137
9137
  value: item.skuId,
9138
9138
  picUrl: item.picUrl,
9139
9139
  outerSkuId: item === null || item === void 0 ? void 0 : item.outerSkuId
@@ -9446,7 +9446,7 @@ var GoodItem = function GoodItem(props) {
9446
9446
  });
9447
9447
  setVisible(false);
9448
9448
  //供应上编码组件 || 商品组件且可以选择sku
9449
- if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && isTaobaoPlat && list.length > 0)) {
9449
+ if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && list.length > 0)) {
9450
9450
  _context2.next = 10;
9451
9451
  break;
9452
9452
  }
@@ -9458,12 +9458,12 @@ var GoodItem = function GoodItem(props) {
9458
9458
  case 7:
9459
9459
  _yield$querySkus = _context2.sent;
9460
9460
  data = _yield$querySkus.data;
9461
- if (data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9461
+ if (data && data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9462
9462
  options = data[0]['skus'].map(function (item) {
9463
9463
  return {
9464
- label: item.propertiesName.split(';').map(function (i) {
9464
+ label: isTaobaoPlat ? item.propertiesName.split(';').map(function (i) {
9465
9465
  return i.split(':').slice(2);
9466
- }).join(';'),
9466
+ }).join(';') : item.propertiesName,
9467
9467
  value: item.skuId,
9468
9468
  picUrl: item.picUrl,
9469
9469
  outerSkuId: item === null || item === void 0 ? void 0 : item.outerSkuId,
@@ -9979,18 +9979,20 @@ var Payment = function Payment(props) {
9979
9979
  _onBlur = props.onBlur,
9980
9980
  _props$replaceValueCh = props.replaceValueCh,
9981
9981
  replaceValueCh = _props$replaceValueCh === void 0 ? {} : _props$replaceValueCh;
9982
- useEffect(function () {
9983
- var platformList = ['TAOBAO', 'FXG'];
9984
- var showBuyerId = (shopList || []).some(function (item) {
9985
- return item.shopId == shopId && platformList.includes(item.shopSourceStr);
9986
- });
9987
- //如果不是淘宝店铺 旺旺id为空
9988
- if (!showBuyerId) {
9989
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9990
- enterprisePaymentBuyerOpenUid: ''
9991
- }));
9992
- }
9993
- }, [shopId, shopList]);
9982
+ // useEffect(() => {
9983
+ // const platformList = ['TAOBAO', 'FXG'];
9984
+ // const showBuyerId = (shopList || []).some(
9985
+ // (item) =>
9986
+ // item.shopId == shopId && platformList.includes(item.shopSourceStr),
9987
+ // );
9988
+ // //如果不是淘宝店铺 旺旺id为空
9989
+ // if (!showBuyerId) {
9990
+ // onChange?.({
9991
+ // ...value,
9992
+ // enterprisePaymentBuyerOpenUid: '',
9993
+ // });
9994
+ // }
9995
+ // }, [shopId, shopList]);
9994
9996
  var changeValue = function changeValue(e, type) {
9995
9997
  var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value));
9996
9998
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
package/dist/index.js CHANGED
@@ -9128,7 +9128,7 @@ var Goods = function Goods(props) {
9128
9128
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
9129
9129
  setVisible(false);
9130
9130
  //供应上编码组件 || 商品组件且可以选择sku
9131
- if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && isTaobaoPlat && list.length > 0)) {
9131
+ if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && list.length > 0)) {
9132
9132
  _context2.next = 12;
9133
9133
  break;
9134
9134
  }
@@ -9140,12 +9140,12 @@ var Goods = function Goods(props) {
9140
9140
  case 9:
9141
9141
  _yield$querySkus = _context2.sent;
9142
9142
  data = _yield$querySkus.data;
9143
- if (data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9143
+ if (data && data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9144
9144
  options = data[0]['skus'].map(function (item) {
9145
9145
  return {
9146
- label: item.propertiesName.split(';').map(function (i) {
9146
+ label: isTaobaoPlat ? item.propertiesName.split(';').map(function (i) {
9147
9147
  return i.split(':').slice(2);
9148
- }).join(';'),
9148
+ }).join(';') : item.propertiesName,
9149
9149
  value: item.skuId,
9150
9150
  picUrl: item.picUrl,
9151
9151
  outerSkuId: item === null || item === void 0 ? void 0 : item.outerSkuId
@@ -9458,7 +9458,7 @@ var GoodItem = function GoodItem(props) {
9458
9458
  });
9459
9459
  setVisible(false);
9460
9460
  //供应上编码组件 || 商品组件且可以选择sku
9461
- if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && isTaobaoPlat && list.length > 0)) {
9461
+ if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && list.length > 0)) {
9462
9462
  _context2.next = 10;
9463
9463
  break;
9464
9464
  }
@@ -9470,12 +9470,12 @@ var GoodItem = function GoodItem(props) {
9470
9470
  case 7:
9471
9471
  _yield$querySkus = _context2.sent;
9472
9472
  data = _yield$querySkus.data;
9473
- if (data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9473
+ if (data && data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
9474
9474
  options = data[0]['skus'].map(function (item) {
9475
9475
  return {
9476
- label: item.propertiesName.split(';').map(function (i) {
9476
+ label: isTaobaoPlat ? item.propertiesName.split(';').map(function (i) {
9477
9477
  return i.split(':').slice(2);
9478
- }).join(';'),
9478
+ }).join(';') : item.propertiesName,
9479
9479
  value: item.skuId,
9480
9480
  picUrl: item.picUrl,
9481
9481
  outerSkuId: item === null || item === void 0 ? void 0 : item.outerSkuId,
@@ -9991,18 +9991,20 @@ var Payment = function Payment(props) {
9991
9991
  _onBlur = props.onBlur,
9992
9992
  _props$replaceValueCh = props.replaceValueCh,
9993
9993
  replaceValueCh = _props$replaceValueCh === void 0 ? {} : _props$replaceValueCh;
9994
- React.useEffect(function () {
9995
- var platformList = ['TAOBAO', 'FXG'];
9996
- var showBuyerId = (shopList || []).some(function (item) {
9997
- return item.shopId == shopId && platformList.includes(item.shopSourceStr);
9998
- });
9999
- //如果不是淘宝店铺 旺旺id为空
10000
- if (!showBuyerId) {
10001
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10002
- enterprisePaymentBuyerOpenUid: ''
10003
- }));
10004
- }
10005
- }, [shopId, shopList]);
9994
+ // useEffect(() => {
9995
+ // const platformList = ['TAOBAO', 'FXG'];
9996
+ // const showBuyerId = (shopList || []).some(
9997
+ // (item) =>
9998
+ // item.shopId == shopId && platformList.includes(item.shopSourceStr),
9999
+ // );
10000
+ // //如果不是淘宝店铺 旺旺id为空
10001
+ // if (!showBuyerId) {
10002
+ // onChange?.({
10003
+ // ...value,
10004
+ // enterprisePaymentBuyerOpenUid: '',
10005
+ // });
10006
+ // }
10007
+ // }, [shopId, shopList]);
10006
10008
  var changeValue = function changeValue(e, type) {
10007
10009
  var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value));
10008
10010
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "1.6.0-beta.10",
3
+ "version": "1.6.0-beta.13",
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.6.0-beta.0",
23
+ "@kmkf-fe-packages/kmkf-utils": "1.6.0-beta.11",
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": "8e7ca05adb195c274949ffd71871603dbf51d45d"
68
+ "gitHead": "bb0b0ec902cd62b1e5bf8a0e1c75296ae643085b"
69
69
  }