@fonixtree/magic-design 2.0.100 → 2.0.102

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.
Files changed (45) hide show
  1. package/es/common/PopUpModal/index.js +9 -215
  2. package/es/common/PopUpModal/index.less +14 -0
  3. package/es/common/ProductFilterModal/components/FilterSearchModal/index.js +2 -5
  4. package/es/common/ProductFilterModal/components/FilterSearchModal/index.less +21 -6
  5. package/es/common/ProductFilterModal/index.js +3 -8
  6. package/es/common/ProductFilterModal/index.less +41 -2
  7. package/es/common/Tag/index.less +2 -2
  8. package/es/composite-comp/monpay/components/Bundle/defaultJSON.js +1 -5
  9. package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +1 -5
  10. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +5 -8
  11. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +1 -1
  12. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +1 -1
  13. package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +2 -6
  14. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +11 -8
  15. package/es/constants/index.js +1 -1
  16. package/es/locale/en/en.json +7 -2
  17. package/es/locale/es/es.json +7 -2
  18. package/es/locale/id/id.json +7 -2
  19. package/es/meta-comp/components/Button/editable.js +1 -1
  20. package/es/meta-comp/components/Button/editable.less +1 -1
  21. package/lib/common/PopUpModal/index.js +9 -215
  22. package/lib/common/PopUpModal/index.less +14 -0
  23. package/lib/common/ProductFilterModal/components/FilterSearchModal/index.js +2 -5
  24. package/lib/common/ProductFilterModal/components/FilterSearchModal/index.less +21 -6
  25. package/lib/common/ProductFilterModal/index.js +3 -8
  26. package/lib/common/ProductFilterModal/index.less +41 -2
  27. package/lib/common/Tag/index.less +2 -2
  28. package/lib/composite-comp/monpay/components/Bundle/defaultJSON.js +1 -5
  29. package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +1 -5
  30. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +5 -8
  31. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +1 -1
  32. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +1 -1
  33. package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +2 -6
  34. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +11 -8
  35. package/lib/constants/index.js +1 -1
  36. package/lib/locale/en/en.json +7 -2
  37. package/lib/locale/es/es.json +7 -2
  38. package/lib/locale/id/id.json +7 -2
  39. package/lib/meta-comp/components/Button/editable.js +1 -1
  40. package/lib/meta-comp/components/Button/editable.less +1 -1
  41. package/package.json +1 -1
  42. package/es/common/PopUpModal1/index.js +0 -164
  43. package/es/common/PopUpModal1/style.less +0 -56
  44. package/lib/common/PopUpModal1/index.js +0 -164
  45. package/lib/common/PopUpModal1/style.less +0 -56
@@ -362,9 +362,9 @@ function (_super) {
362
362
  }, '#CE1126') : '#CE1126';
363
363
  };
364
364
 
365
- _this.getProductList = function (index) {
365
+ _this.getProductList = function (index, filterParams) {
366
366
  return __awaiter(_this, void 0, void 0, function () {
367
- var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res, res, _h, pageInfo, brandIds, catgIds, offerAttrValues, serviceIds, e_1, _cache;
367
+ var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res, res, _h, pageInfo, serviceIds, brandIds, catgIds, offerAttrValues, e_1, _cache;
368
368
 
369
369
  var _j, _k, _l;
370
370
 
@@ -468,7 +468,7 @@ function (_super) {
468
468
  case 7:
469
469
  return [4
470
470
  /*yield*/
471
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', {
471
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', __assign({
472
472
  pageIndex: 1,
473
473
  pageSize: maxProdNum,
474
474
  sortType: '1',
@@ -476,16 +476,16 @@ function (_super) {
476
476
  intelligentValue: intelligentValue.join(','),
477
477
  aggregation: false,
478
478
  storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
479
- }, 'POST')];
479
+ }, filterParams), 'POST')];
480
480
 
481
481
  case 8:
482
- _h = _m.sent(), pageInfo = _h.pageInfo, brandIds = _h.brandIds, catgIds = _h.catgIds, offerAttrValues = _h.offerAttrValues, serviceIds = _h.serviceIds;
482
+ _h = _m.sent(), pageInfo = _h.pageInfo, serviceIds = _h.serviceIds, brandIds = _h.brandIds, catgIds = _h.catgIds, offerAttrValues = _h.offerAttrValues;
483
483
  this.setState({
484
484
  filterObj: {
485
+ serviceIds: serviceIds,
485
486
  brandIds: brandIds,
486
487
  catgIds: catgIds,
487
- offerAttrValues: offerAttrValues,
488
- serviceIds: serviceIds
488
+ offerAttrValues: offerAttrValues
489
489
  }
490
490
  });
491
491
  newData = __spreadArrays(pageInfo.list);
@@ -592,8 +592,11 @@ function (_super) {
592
592
  _this.onSearchCondChange = function (cond) {
593
593
  _this.setState({
594
594
  searchParams: cond
595
- }); // initProduct({ pageIndex: 1/, pageSize: 10, q: searchValue, ...linkParams, ...cond });
595
+ });
596
+
597
+ var tabIndex = _this.state.tabIndex;
596
598
 
599
+ _this.getProductList(tabIndex, cond);
597
600
  };
598
601
 
599
602
  return _this;
@@ -183,7 +183,7 @@ var compInfoMap = {
183
183
  icon: 'icon-forms'
184
184
  },
185
185
  MONPAY_RECOMMEND: {
186
- name: 'Monpay Recommend',
186
+ name: 'Recommend',
187
187
  icon: 'icon-forms'
188
188
  },
189
189
  INTEREST_PRODUCTS: {
@@ -1,4 +1,11 @@
1
1
  {
2
+ "OK": "OK",
3
+ "BRANDS": "Brands",
4
+ "CATEGORY": "Category",
5
+ "SERVICE": "Service",
6
+ "RATINGS": "Ratings",
7
+ "STAR": "Star",
8
+ "APPLY": "Apply",
2
9
  "SORT_BY": "Sort by",
3
10
  "PROMOTION": "Promotion",
4
11
  "HIGHEST_RATED": "Highest rated",
@@ -158,7 +165,6 @@
158
165
  "ALL": "ALL",
159
166
  "HOT": "Hot",
160
167
  "GUESS_YOU_LIKE": "Guess you like",
161
- "CATEGORY": "Category",
162
168
  "LABEL": "Label",
163
169
  "UNDERLINE_STYLE": "Underline Style",
164
170
  "UNDERLINE_COLOR": "Underline Color",
@@ -214,7 +220,6 @@
214
220
  "GROUP_BY": "Group By",
215
221
  "FLASH_SALE": "Flash Sale",
216
222
  "THE_PRODUCT_QUANTITY_WILL_BE_AUTOMATICALLY_UPDATED_WITH_THE_ITEMS_THAT_MEET_THE_CATEGORY_CONDITIONS": "The product quantity will be automatically updated with the items that meet the category conditions",
217
- "OK": "OK",
218
223
  "CANCEL": "Cancel",
219
224
  "LINK_TYPE": "Link Type",
220
225
  "LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_": "Looks like you do not have any images in your gallery. Choose images to feature on this page.",
@@ -1,4 +1,11 @@
1
1
  {
2
+ "OK": "OK",
3
+ "BRANDS": "Brands",
4
+ "CATEGORY": "Categoría",
5
+ "SERVICE": "Service",
6
+ "RATINGS": "Ratings",
7
+ "STAR": "Star",
8
+ "APPLY": "Apply",
2
9
  "SORT_BY": "Sort by",
3
10
  "PROMOTION": "Promotion",
4
11
  "HIGHEST_RATED": "Highest rated",
@@ -158,7 +165,6 @@
158
165
  "ALL": "TODO",
159
166
  "HOT": "Caliente",
160
167
  "GUESS_YOU_LIKE": "Supongo que te gusta",
161
- "CATEGORY": "Categoría",
162
168
  "LABEL": "Etiqueta",
163
169
  "UNDERLINE_STYLE": "Estilo de subrayado",
164
170
  "UNDERLINE_COLOR": "Color de subrayado",
@@ -214,7 +220,6 @@
214
220
  "GROUP_BY": "Agrupar por",
215
221
  "FLASH_SALE": "Oferta relámpago",
216
222
  "THE_PRODUCT_QUANTITY_WILL_BE_AUTOMATICALLY_UPDATED_WITH_THE_ITEMS_THAT_MEET_THE_CATEGORY_CONDITIONS": "La cantidad del producto se actualizará automáticamente con los artículos que cumplan con las condiciones de la categoría",
217
- "OK": "OK",
218
223
  "CANCEL": "Cancelar",
219
224
  "LINK_TYPE": "Tipo de enlace",
220
225
  "LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_": "Parece que no tiene ninguna imagen en su galería. Elija imágenes para mostrar en esta página.",
@@ -1,4 +1,11 @@
1
1
  {
2
+ "OK": "OK",
3
+ "BRANDS": "Brands",
4
+ "CATEGORY": "Category",
5
+ "SERVICE": "Service",
6
+ "RATINGS": "Ratings",
7
+ "STAR": "Star",
8
+ "APPLY": "Apply",
2
9
  "SORT_BY": "Sort by",
3
10
  "PROMOTION": "Promotion",
4
11
  "HIGHEST_RATED": "Highest rated",
@@ -158,7 +165,6 @@
158
165
  "ALL": "ALL",
159
166
  "HOT": "Hot",
160
167
  "GUESS_YOU_LIKE": "Guess you like",
161
- "CATEGORY": "Category",
162
168
  "LABEL": "Label",
163
169
  "UNDERLINE_STYLE": "Underline Style",
164
170
  "UNDERLINE_COLOR": "Underline Color",
@@ -214,7 +220,6 @@
214
220
  "GROUP_BY": "Group By",
215
221
  "FLASH_SALE": "Flash Sale",
216
222
  "THE_PRODUCT_QUANTITY_WILL_BE_AUTOMATICALLY_UPDATED_WITH_THE_ITEMS_THAT_MEET_THE_CATEGORY_CONDITIONS": "The product quantity will be automatically updated with the items that meet the category conditions",
217
- "OK": "OK",
218
223
  "CANCEL": "Cancel",
219
224
  "LINK_TYPE": "Link Type",
220
225
  "LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_": "Looks like you do not have any images in your gallery. Choose images to feature on this page.",
@@ -99,7 +99,7 @@ function (_super) {
99
99
  this.preData = JSON.stringify(data);
100
100
  this.preDevice = window.magicDesign.device;
101
101
  return /*#__PURE__*/_react["default"].createElement("span", {
102
- className: "item",
102
+ className: "editable-item",
103
103
  contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
104
104
  onInput: function onInput(e) {
105
105
  var text = e.target.textContent;
@@ -1,4 +1,4 @@
1
- .item {
1
+ .editable-item {
2
2
  width: 100%;
3
3
  display: flex;
4
4
  align-items: center;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.100",
4
+ "version": "2.0.102",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
@@ -1,164 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _antd = require("antd");
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
- var _style = _interopRequireDefault(require("./style.less"));
15
-
16
- var _Button = _interopRequireDefault(require("../Button"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
-
22
- var __extends = void 0 && (void 0).__extends || function () {
23
- var _extendStatics = function extendStatics(d, b) {
24
- _extendStatics = Object.setPrototypeOf || {
25
- __proto__: []
26
- } instanceof Array && function (d, b) {
27
- d.__proto__ = b;
28
- } || function (d, b) {
29
- for (var p in b) {
30
- if (b.hasOwnProperty(p)) d[p] = b[p];
31
- }
32
- };
33
-
34
- return _extendStatics(d, b);
35
- };
36
-
37
- return function (d, b) {
38
- _extendStatics(d, b);
39
-
40
- function __() {
41
- this.constructor = d;
42
- }
43
-
44
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
- };
46
- }();
47
-
48
- var __assign = void 0 && (void 0).__assign || function () {
49
- __assign = Object.assign || function (t) {
50
- for (var s, i = 1, n = arguments.length; i < n; i++) {
51
- s = arguments[i];
52
-
53
- for (var p in s) {
54
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
- }
56
- }
57
-
58
- return t;
59
- };
60
-
61
- return __assign.apply(this, arguments);
62
- };
63
-
64
- var __rest = void 0 && (void 0).__rest || function (s, e) {
65
- var t = {};
66
-
67
- for (var p in s) {
68
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
69
- }
70
-
71
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
72
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
73
- }
74
- return t;
75
- };
76
- /* eslint-disable max-len */
77
-
78
- /* eslint-disable react/prefer-stateless-function */
79
-
80
-
81
- var MyModal =
82
- /** @class */
83
- function (_super) {
84
- __extends(MyModal, _super);
85
-
86
- function MyModal() {
87
- return _super !== null && _super.apply(this, arguments) || this;
88
- }
89
-
90
- MyModal.prototype.render = function () {
91
- var _a = this.props,
92
- onOk = _a.onOk,
93
- okText = _a.okText,
94
- hideCloseBtn = _a.hideCloseBtn,
95
- title = _a.title,
96
- visible = _a.visible,
97
- onCloseText = _a.onCloseText,
98
- onClose = _a.onClose,
99
- children = _a.children,
100
- rest = __rest(_a, ["onOk", "okText", "hideCloseBtn", "title", "visible", "onCloseText", "onClose", "children"]);
101
-
102
- var style = rest.style;
103
- Reflect.deleteProperty(rest, 'style');
104
- var showCloseBtn = !hideCloseBtn && onClose;
105
- return /*#__PURE__*/_react["default"].createElement(_antd.Popup, _extends({
106
- className: _style["default"].container,
107
- closeOnMaskClick: true,
108
- onClose: onClose,
109
- visible: visible
110
- }, rest), /*#__PURE__*/_react["default"].createElement("div", {
111
- className: "modal-content-wrap",
112
- style: __assign({}, style)
113
- }, /*#__PURE__*/_react["default"].createElement("div", {
114
- className: "topLineWrap"
115
- }, /*#__PURE__*/_react["default"].createElement("div", {
116
- className: "topLine",
117
- onClick: onClose
118
- })), title && /*#__PURE__*/_react["default"].createElement("div", {
119
- className: "modal-title"
120
- }, title), children, (onOk || showCloseBtn) && /*#__PURE__*/_react["default"].createElement("div", {
121
- className: "btn-wrap"
122
- }, onOk && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
123
- onClick: onOk
124
- }, okText), showCloseBtn && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
125
- onClick: onClose,
126
- plain: true
127
- }, onCloseText))));
128
- };
129
-
130
- return MyModal;
131
- }(_react["default"].Component);
132
-
133
- MyModal.propTypes = {
134
- /** title */
135
- title: _propTypes["default"].string,
136
-
137
- /** visible */
138
- visible: _propTypes["default"].bool,
139
-
140
- /** onClose */
141
- onClose: _propTypes["default"].func,
142
-
143
- /** 确认按钮事件 */
144
- onOk: _propTypes["default"].func,
145
-
146
- /** 确认按钮文案 */
147
- okText: _propTypes["default"].string,
148
-
149
- /** 取消按钮文案 */
150
- onCloseText: _propTypes["default"].string,
151
-
152
- /** 取消按钮文案 */
153
- hideCloseBtn: _propTypes["default"].bool
154
- };
155
- MyModal.defaultProps = {
156
- title: '',
157
- visible: false,
158
- onClose: function onClose() {},
159
- okText: 'Ok',
160
- onCloseText: 'Cancel',
161
- hideCloseBtn: false
162
- };
163
- var _default = MyModal;
164
- exports["default"] = _default;
@@ -1,56 +0,0 @@
1
- .container {
2
- :global {
3
- .topLineWrap {
4
- display: flex;
5
- align-items: center;
6
- justify-content: center;
7
- height: 24px;
8
-
9
- .topLine {
10
- width: 42px;
11
- height: 4px;
12
- background: rgba(233, 233, 233, 1);
13
- border-radius: 2px;
14
- }
15
- }
16
-
17
- .btn-wrap {
18
- padding: 12px 24px;
19
-
20
- &>div+div {
21
- margin-top: 12px;
22
- }
23
- }
24
-
25
-
26
- .adm-popup-body {
27
- border-radius: 10px 10px 0px 0px;
28
- background: #FFF;
29
- box-shadow: 0px -10px 5px 0px rgba(0, 0, 0, 0.05);
30
- }
31
-
32
- .am-modal-content {
33
- text-align: left;
34
- }
35
-
36
- .am-modal-content {
37
- border-radius: 0;
38
- }
39
-
40
- .modal-content-wrap {
41
- padding: 0;
42
- position: relative;
43
-
44
- .modal-title {
45
- font-size: 16px;
46
- font-weight: 600;
47
- color: #000;
48
- display: flex;
49
- align-items: center;
50
- justify-content: center;
51
- height: 48px;
52
- padding: 12px 16px 0 16px;
53
- }
54
- }
55
- }
56
- }
@@ -1,164 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _antd = require("antd");
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
- var _style = _interopRequireDefault(require("./style.less"));
15
-
16
- var _Button = _interopRequireDefault(require("../Button"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
-
22
- var __extends = void 0 && (void 0).__extends || function () {
23
- var _extendStatics = function extendStatics(d, b) {
24
- _extendStatics = Object.setPrototypeOf || {
25
- __proto__: []
26
- } instanceof Array && function (d, b) {
27
- d.__proto__ = b;
28
- } || function (d, b) {
29
- for (var p in b) {
30
- if (b.hasOwnProperty(p)) d[p] = b[p];
31
- }
32
- };
33
-
34
- return _extendStatics(d, b);
35
- };
36
-
37
- return function (d, b) {
38
- _extendStatics(d, b);
39
-
40
- function __() {
41
- this.constructor = d;
42
- }
43
-
44
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
- };
46
- }();
47
-
48
- var __assign = void 0 && (void 0).__assign || function () {
49
- __assign = Object.assign || function (t) {
50
- for (var s, i = 1, n = arguments.length; i < n; i++) {
51
- s = arguments[i];
52
-
53
- for (var p in s) {
54
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
- }
56
- }
57
-
58
- return t;
59
- };
60
-
61
- return __assign.apply(this, arguments);
62
- };
63
-
64
- var __rest = void 0 && (void 0).__rest || function (s, e) {
65
- var t = {};
66
-
67
- for (var p in s) {
68
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
69
- }
70
-
71
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
72
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
73
- }
74
- return t;
75
- };
76
- /* eslint-disable max-len */
77
-
78
- /* eslint-disable react/prefer-stateless-function */
79
-
80
-
81
- var MyModal =
82
- /** @class */
83
- function (_super) {
84
- __extends(MyModal, _super);
85
-
86
- function MyModal() {
87
- return _super !== null && _super.apply(this, arguments) || this;
88
- }
89
-
90
- MyModal.prototype.render = function () {
91
- var _a = this.props,
92
- onOk = _a.onOk,
93
- okText = _a.okText,
94
- hideCloseBtn = _a.hideCloseBtn,
95
- title = _a.title,
96
- visible = _a.visible,
97
- onCloseText = _a.onCloseText,
98
- onClose = _a.onClose,
99
- children = _a.children,
100
- rest = __rest(_a, ["onOk", "okText", "hideCloseBtn", "title", "visible", "onCloseText", "onClose", "children"]);
101
-
102
- var style = rest.style;
103
- Reflect.deleteProperty(rest, 'style');
104
- var showCloseBtn = !hideCloseBtn && onClose;
105
- return /*#__PURE__*/_react["default"].createElement(_antd.Popup, _extends({
106
- className: _style["default"].container,
107
- closeOnMaskClick: true,
108
- onClose: onClose,
109
- visible: visible
110
- }, rest), /*#__PURE__*/_react["default"].createElement("div", {
111
- className: "modal-content-wrap",
112
- style: __assign({}, style)
113
- }, /*#__PURE__*/_react["default"].createElement("div", {
114
- className: "topLineWrap"
115
- }, /*#__PURE__*/_react["default"].createElement("div", {
116
- className: "topLine",
117
- onClick: onClose
118
- })), title && /*#__PURE__*/_react["default"].createElement("div", {
119
- className: "modal-title"
120
- }, title), children, (onOk || showCloseBtn) && /*#__PURE__*/_react["default"].createElement("div", {
121
- className: "btn-wrap"
122
- }, onOk && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
123
- onClick: onOk
124
- }, okText), showCloseBtn && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
125
- onClick: onClose,
126
- plain: true
127
- }, onCloseText))));
128
- };
129
-
130
- return MyModal;
131
- }(_react["default"].Component);
132
-
133
- MyModal.propTypes = {
134
- /** title */
135
- title: _propTypes["default"].string,
136
-
137
- /** visible */
138
- visible: _propTypes["default"].bool,
139
-
140
- /** onClose */
141
- onClose: _propTypes["default"].func,
142
-
143
- /** 确认按钮事件 */
144
- onOk: _propTypes["default"].func,
145
-
146
- /** 确认按钮文案 */
147
- okText: _propTypes["default"].string,
148
-
149
- /** 取消按钮文案 */
150
- onCloseText: _propTypes["default"].string,
151
-
152
- /** 取消按钮文案 */
153
- hideCloseBtn: _propTypes["default"].bool
154
- };
155
- MyModal.defaultProps = {
156
- title: '',
157
- visible: false,
158
- onClose: function onClose() {},
159
- okText: 'Ok',
160
- onCloseText: 'Cancel',
161
- hideCloseBtn: false
162
- };
163
- var _default = MyModal;
164
- exports["default"] = _default;
@@ -1,56 +0,0 @@
1
- .container {
2
- :global {
3
- .topLineWrap {
4
- display: flex;
5
- align-items: center;
6
- justify-content: center;
7
- height: 24px;
8
-
9
- .topLine {
10
- width: 42px;
11
- height: 4px;
12
- background: rgba(233, 233, 233, 1);
13
- border-radius: 2px;
14
- }
15
- }
16
-
17
- .btn-wrap {
18
- padding: 12px 24px;
19
-
20
- &>div+div {
21
- margin-top: 12px;
22
- }
23
- }
24
-
25
-
26
- .adm-popup-body {
27
- border-radius: 10px 10px 0px 0px;
28
- background: #FFF;
29
- box-shadow: 0px -10px 5px 0px rgba(0, 0, 0, 0.05);
30
- }
31
-
32
- .am-modal-content {
33
- text-align: left;
34
- }
35
-
36
- .am-modal-content {
37
- border-radius: 0;
38
- }
39
-
40
- .modal-content-wrap {
41
- padding: 0;
42
- position: relative;
43
-
44
- .modal-title {
45
- font-size: 16px;
46
- font-weight: 600;
47
- color: #000;
48
- display: flex;
49
- align-items: center;
50
- justify-content: center;
51
- height: 48px;
52
- padding: 12px 16px 0 16px;
53
- }
54
- }
55
- }
56
- }