@kmkf-fe-packages/basic-components 2.2.44-beta.23 → 2.2.44-beta.24

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
@@ -12113,7 +12113,7 @@ var ChooseBaby = function ChooseBaby(props) {
12113
12113
  }));
12114
12114
  };
12115
12115
 
12116
- var css_248z$7 = "#goods-wrap.goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-pic,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs {\n flex-grow: 1;\n flex-shrink: 1;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n#goods-wrap .good-item.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: nowrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n#goods-wrap .good-item.rich-item.with-pic {\n flex-basis: 90px;\n}\n#goods-wrap .good-item.rich-item.with-attr {\n flex-basis: 150px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n#goods-wrap .good-item.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n#goods-wrap .good-item.rich-item .good-img {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 0 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n#goods-wrap .good-item.rich-item .good-attrs {\n display: flex;\n flex-direction: column;\n font-size: 12px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n#goods-wrap .good-item.rich-item .good-attrs div {\n display: flex;\n}\n#goods-wrap .good-item.rich-item .good-attrs div:not(:first-child) {\n margin-top: 4px;\n}\n";
12116
+ var css_248z$7 = "#goods-wrap.goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-pic,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs {\n flex-grow: 1;\n flex-shrink: 1;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n#goods-wrap .good-item.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: nowrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n#goods-wrap .good-item.rich-item.with-pic {\n flex-basis: 90px;\n}\n#goods-wrap .good-item.rich-item.with-attr {\n flex-basis: 150px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n#goods-wrap .good-item.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n#goods-wrap .good-item.rich-item .good-img {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 0 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n#goods-wrap .good-item.rich-item .good-attrs {\n display: flex;\n flex-direction: column;\n font-size: 12px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n#goods-wrap .good-item.rich-item .good-attrs div {\n display: flex;\n}\n#goods-wrap .good-item.rich-item .good-attrs div:not(:first-child) {\n margin-top: 4px;\n}\n.goods-uploaded-state {\n display: flex;\n}\n.goods-uploaded-state .clear-all {\n float: right;\n color: #1966ff;\n cursor: pointer;\n margin-left: 12px;\n}\n";
12117
12117
  styleInject(css_248z$7);
12118
12118
 
12119
12119
  var GoodItem = function GoodItem(props) {
@@ -12442,13 +12442,22 @@ var GoodItem = function GoodItem(props) {
12442
12442
  var hasAttr = useMemo(function () {
12443
12443
  return hasPic ? headerList.length > 1 : headerList.length > 0;
12444
12444
  }, [hasPic, headerList]);
12445
+ var clearAll = function clearAll() {
12446
+ onChange === null || onChange === void 0 ? void 0 : onChange({
12447
+ shopId: shopId,
12448
+ imgList: []
12449
+ });
12450
+ };
12445
12451
  return /*#__PURE__*/React.createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React.createElement("p", {
12446
12452
  className: "goods-title"
12447
12453
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
12448
12454
  className: "goods-uploaded-state"
12449
12455
  }, "\u5DF2\u6DFB\u52A0", /*#__PURE__*/React.createElement("span", {
12450
12456
  className: "goods-uploaded-count"
12451
- }, imgList.length), "/", maxLength, "\u4E2A\u5B9D\u8D1D"), /*#__PURE__*/React.createElement("div", {
12457
+ }, imgList.length), "/", maxLength, /*#__PURE__*/React.createElement("span", {
12458
+ className: 'clear-all',
12459
+ onClick: clearAll
12460
+ }, "\u6E05\u7A7A")), /*#__PURE__*/React.createElement("div", {
12452
12461
  ref: boxRef,
12453
12462
  id: "goods-wrap",
12454
12463
  className: "goodsBox goodsBox-item-horizontal--box".concat(isSingleRow ? ' single-row' : '')
package/dist/index.js CHANGED
@@ -12128,7 +12128,7 @@ var ChooseBaby = function ChooseBaby(props) {
12128
12128
  }));
12129
12129
  };
12130
12130
 
12131
- var css_248z$7 = "#goods-wrap.goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-pic,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs {\n flex-grow: 1;\n flex-shrink: 1;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n#goods-wrap .good-item.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: nowrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n#goods-wrap .good-item.rich-item.with-pic {\n flex-basis: 90px;\n}\n#goods-wrap .good-item.rich-item.with-attr {\n flex-basis: 150px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n#goods-wrap .good-item.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n#goods-wrap .good-item.rich-item .good-img {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 0 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n#goods-wrap .good-item.rich-item .good-attrs {\n display: flex;\n flex-direction: column;\n font-size: 12px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n#goods-wrap .good-item.rich-item .good-attrs div {\n display: flex;\n}\n#goods-wrap .good-item.rich-item .good-attrs div:not(:first-child) {\n margin-top: 4px;\n}\n";
12131
+ var css_248z$7 = "#goods-wrap.goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-pic,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs {\n flex-grow: 1;\n flex-shrink: 1;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n#goods-wrap .good-item.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: nowrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n#goods-wrap .good-item.rich-item.with-pic {\n flex-basis: 90px;\n}\n#goods-wrap .good-item.rich-item.with-attr {\n flex-basis: 150px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n#goods-wrap .good-item.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n#goods-wrap .good-item.rich-item .good-img {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 0 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n#goods-wrap .good-item.rich-item .good-attrs {\n display: flex;\n flex-direction: column;\n font-size: 12px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n#goods-wrap .good-item.rich-item .good-attrs div {\n display: flex;\n}\n#goods-wrap .good-item.rich-item .good-attrs div:not(:first-child) {\n margin-top: 4px;\n}\n.goods-uploaded-state {\n display: flex;\n}\n.goods-uploaded-state .clear-all {\n float: right;\n color: #1966ff;\n cursor: pointer;\n margin-left: 12px;\n}\n";
12132
12132
  styleInject(css_248z$7);
12133
12133
 
12134
12134
  var GoodItem = function GoodItem(props) {
@@ -12457,13 +12457,22 @@ var GoodItem = function GoodItem(props) {
12457
12457
  var hasAttr = React.useMemo(function () {
12458
12458
  return hasPic ? headerList.length > 1 : headerList.length > 0;
12459
12459
  }, [hasPic, headerList]);
12460
+ var clearAll = function clearAll() {
12461
+ onChange === null || onChange === void 0 ? void 0 : onChange({
12462
+ shopId: shopId,
12463
+ imgList: []
12464
+ });
12465
+ };
12460
12466
  return /*#__PURE__*/React__default['default'].createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React__default['default'].createElement("p", {
12461
12467
  className: "goods-title"
12462
12468
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React__default['default'].createElement("p", {
12463
12469
  className: "goods-uploaded-state"
12464
12470
  }, "\u5DF2\u6DFB\u52A0", /*#__PURE__*/React__default['default'].createElement("span", {
12465
12471
  className: "goods-uploaded-count"
12466
- }, imgList.length), "/", maxLength, "\u4E2A\u5B9D\u8D1D"), /*#__PURE__*/React__default['default'].createElement("div", {
12472
+ }, imgList.length), "/", maxLength, /*#__PURE__*/React__default['default'].createElement("span", {
12473
+ className: 'clear-all',
12474
+ onClick: clearAll
12475
+ }, "\u6E05\u7A7A")), /*#__PURE__*/React__default['default'].createElement("div", {
12467
12476
  ref: boxRef,
12468
12477
  id: "goods-wrap",
12469
12478
  className: "goodsBox goodsBox-item-horizontal--box".concat(isSingleRow ? ' single-row' : '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.2.44-beta.23",
3
+ "version": "2.2.44-beta.24",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "fe6235742c550d5bc7adf697b8d0bcbf6b407913"
69
+ "gitHead": "2337d45c74f309e27117d93d4c20c7dd556ef04e"
70
70
  }