@fonixtree/magic-design 1.0.6 → 1.0.8
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/es/common/LinkModal/FilteredProductModal/index.js +1 -1
- package/es/common/ProductModal/index.js +2 -2
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/common/components/ProductItem/index.js +1 -1
- package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +20 -0
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +9 -8
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -9
- package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +11 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +2 -2
- package/es/decorator/index.js +24 -1
- package/es/meta-comp/components/Button/index.js +7 -0
- package/es/meta-comp/components/Text/index.js +7 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/es/utils/commonUtil.js +1 -1
- package/es/utils/currencyUtil.js +8 -8
- package/lib/common/LinkModal/FilteredProductModal/index.js +1 -1
- package/lib/common/ProductModal/index.js +2 -2
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
- package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +20 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +9 -8
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -9
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +11 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +2 -2
- package/lib/decorator/index.js +24 -1
- package/lib/meta-comp/components/Button/index.js +7 -0
- package/lib/meta-comp/components/Text/index.js +7 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/lib/utils/commonUtil.js +1 -1
- package/lib/utils/currencyUtil.js +8 -8
- package/package.json +1 -1
|
@@ -447,7 +447,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
447
447
|
switch (_a.label) {
|
|
448
448
|
case 0:
|
|
449
449
|
precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
|
|
450
|
-
return window.
|
|
450
|
+
return window.systemParams.precision;
|
|
451
451
|
}, '0'));
|
|
452
452
|
params = {
|
|
453
453
|
catgIds: tValue.join(','),
|
|
@@ -383,7 +383,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
383
383
|
case 0:
|
|
384
384
|
return [4
|
|
385
385
|
/*yield*/
|
|
386
|
-
, (0, _commonUtil.commonFetch)(
|
|
386
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/storeoffercatgs", {}, 'GET')];
|
|
387
387
|
|
|
388
388
|
case 1:
|
|
389
389
|
res = _a.sent();
|
|
@@ -409,7 +409,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
409
409
|
case 0:
|
|
410
410
|
return [4
|
|
411
411
|
/*yield*/
|
|
412
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
412
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
|
|
413
413
|
|
|
414
414
|
case 1:
|
|
415
415
|
res = _a.sent();
|
|
Binary file
|
|
@@ -133,7 +133,7 @@ function (_super) {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
136
|
-
return window.
|
|
136
|
+
return window.systemParams.prefix;
|
|
137
137
|
}, 'Rp');
|
|
138
138
|
|
|
139
139
|
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
@@ -30,6 +30,26 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
30
30
|
pcImgHoverUrl: '',
|
|
31
31
|
h5ImgHoverUrl: ''
|
|
32
32
|
}
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
id: (0, _uuid.v4)(),
|
|
36
|
+
open: true,
|
|
37
|
+
type: 'TEXT',
|
|
38
|
+
specialContent: [],
|
|
39
|
+
text: 'Title',
|
|
40
|
+
content: {
|
|
41
|
+
sizeType: 'Customize font styles',
|
|
42
|
+
fontFamily: 'Open Sans',
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
fontSize: 16,
|
|
45
|
+
color: '#070707'
|
|
46
|
+
},
|
|
47
|
+
underline: {
|
|
48
|
+
open: false,
|
|
49
|
+
textDecorationColor: '',
|
|
50
|
+
textDecorationStyle: 'solid'
|
|
51
|
+
},
|
|
52
|
+
vertical: {}
|
|
33
53
|
}
|
|
34
54
|
},
|
|
35
55
|
spacing: {
|
|
@@ -337,14 +337,14 @@ function (_super) {
|
|
|
337
337
|
SignBoardMobile.prototype.render = function () {
|
|
338
338
|
var _this = this;
|
|
339
339
|
|
|
340
|
-
var _a;
|
|
340
|
+
var _a, _b;
|
|
341
341
|
|
|
342
342
|
var data = this.props.data; // console.log('--SignBoard', data);
|
|
343
343
|
|
|
344
|
-
var
|
|
345
|
-
storeInfo =
|
|
346
|
-
isFollow =
|
|
347
|
-
inputVal =
|
|
344
|
+
var _c = this.state,
|
|
345
|
+
storeInfo = _c.storeInfo,
|
|
346
|
+
isFollow = _c.isFollow,
|
|
347
|
+
inputVal = _c.inputVal;
|
|
348
348
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
349
349
|
className: "m-sign-board-bar"
|
|
350
350
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -377,9 +377,10 @@ function (_super) {
|
|
|
377
377
|
height: 44,
|
|
378
378
|
width: 44
|
|
379
379
|
}
|
|
380
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
381
|
-
className: "
|
|
382
|
-
|
|
380
|
+
})), data.content && ((_b = data.content.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
381
|
+
className: "card-text",
|
|
382
|
+
data: data.content.title
|
|
383
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
383
384
|
onClick: this.clickCollect
|
|
384
385
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
385
386
|
color: isFollow ? '#F1600F' : '#333333',
|
|
@@ -62,12 +62,3 @@
|
|
|
62
62
|
text-transform: uppercase;
|
|
63
63
|
color: #333333;
|
|
64
64
|
}
|
|
65
|
-
.m-sign-board-bar .store-info-wrap .store-name {
|
|
66
|
-
flex: 1;
|
|
67
|
-
margin-left: 0.24rem;
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
font-size: 0.32rem;
|
|
70
|
-
line-height: 0.4rem;
|
|
71
|
-
color: #070707;
|
|
72
|
-
font-family: 'Montserrat';
|
|
73
|
-
}
|
package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/conf
|
|
|
15
15
|
|
|
16
16
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
17
|
|
|
18
|
+
var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
19
|
+
|
|
18
20
|
var _locale = require("../../../../../locale");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -69,13 +71,21 @@ function (_super) {
|
|
|
69
71
|
SignBoardConfigContent.prototype.render = function () {
|
|
70
72
|
var panelProps = this.props.panelProps;
|
|
71
73
|
var source = [{
|
|
72
|
-
key: '
|
|
74
|
+
key: 'logo',
|
|
73
75
|
name: (0, _locale.i18n)('LOGO'),
|
|
74
76
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
75
77
|
data: panelProps.logo
|
|
76
78
|
}),
|
|
77
79
|
metaOption: panelProps.logo,
|
|
78
80
|
toggleType: 'switch'
|
|
81
|
+
}, {
|
|
82
|
+
key: 'title',
|
|
83
|
+
name: (0, _locale.i18n)('TITLE'),
|
|
84
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
85
|
+
data: panelProps.title
|
|
86
|
+
}),
|
|
87
|
+
metaOption: panelProps.title,
|
|
88
|
+
toggleType: 'switch'
|
|
79
89
|
}];
|
|
80
90
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
81
91
|
headerSize: "middle",
|
package/es/decorator/index.js
CHANGED
|
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "metaDecorator", {
|
|
|
27
27
|
return _metaDecorator["default"];
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
exports.shouldUpdate = shouldUpdate;
|
|
30
31
|
Object.defineProperty(exports, "updateConfigDecorator", {
|
|
31
32
|
enumerable: true,
|
|
32
33
|
get: function get() {
|
|
@@ -42,4 +43,26 @@ var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecor
|
|
|
42
43
|
|
|
43
44
|
var _lazyLoadDecorator = require("./lazyLoadDecorator");
|
|
44
45
|
|
|
45
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
46
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
47
|
+
|
|
48
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
49
|
+
|
|
50
|
+
/** props 和 state 改变时才会render */
|
|
51
|
+
function shouldUpdate() {
|
|
52
|
+
return function (target, name, descriptor) {
|
|
53
|
+
var fn = descriptor.value;
|
|
54
|
+
|
|
55
|
+
descriptor.value = function (nextProps, nextState) {
|
|
56
|
+
var nowPropsJson = JSON.stringify(nextProps);
|
|
57
|
+
var nowStateJson = JSON.stringify(nextState);
|
|
58
|
+
var should1 = nowPropsJson != this.preProps;
|
|
59
|
+
var should2 = nowStateJson != this.preState;
|
|
60
|
+
this.preProps = nowPropsJson;
|
|
61
|
+
this.preState = nowStateJson;
|
|
62
|
+
var result = should1 || should2;
|
|
63
|
+
return result && fn.apply(this, {
|
|
64
|
+
nextProps: nextProps
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -93,6 +93,10 @@ function (_super) {
|
|
|
93
93
|
return _this;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
Button.prototype.shouldComponentUpdate = function () {
|
|
97
|
+
return true;
|
|
98
|
+
};
|
|
99
|
+
|
|
96
100
|
Button.prototype.render = function () {
|
|
97
101
|
var _this = this;
|
|
98
102
|
|
|
@@ -168,6 +172,9 @@ function (_super) {
|
|
|
168
172
|
className: '',
|
|
169
173
|
readonly: false
|
|
170
174
|
};
|
|
175
|
+
|
|
176
|
+
__decorate([(0, _decorator.shouldUpdate)()], Button.prototype, "shouldComponentUpdate", null);
|
|
177
|
+
|
|
171
178
|
Button = __decorate([_decorator.metaDecorator], Button);
|
|
172
179
|
return Button;
|
|
173
180
|
}(_react.Component);
|
|
@@ -203,6 +203,10 @@ function (_super) {
|
|
|
203
203
|
});
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
+
Text.prototype.shouldComponentUpdate = function () {
|
|
207
|
+
return true;
|
|
208
|
+
};
|
|
209
|
+
|
|
206
210
|
Text.prototype.render = function () {
|
|
207
211
|
var _a = this.props,
|
|
208
212
|
data = _a.data,
|
|
@@ -272,6 +276,9 @@ function (_super) {
|
|
|
272
276
|
readonly: false,
|
|
273
277
|
onTextInput: function onTextInput() {}
|
|
274
278
|
};
|
|
279
|
+
|
|
280
|
+
__decorate([(0, _decorator.shouldUpdate)()], Text.prototype, "shouldComponentUpdate", null);
|
|
281
|
+
|
|
275
282
|
Text = __decorate([_decorator.metaDecorator], Text);
|
|
276
283
|
return Text;
|
|
277
284
|
}(_react["default"].Component);
|
|
@@ -11,6 +11,8 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
|
|
14
16
|
var _locale = require("../../../locale");
|
|
15
17
|
|
|
16
18
|
var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
|
|
@@ -104,11 +106,11 @@ function (_super) {
|
|
|
104
106
|
|
|
105
107
|
_this.updateAttr(data, 'hover', {
|
|
106
108
|
open: true,
|
|
107
|
-
buttonBorder: data.buttonBorder,
|
|
108
|
-
buttonIcon: data.buttonIcon,
|
|
109
|
-
buttonText: data.buttonText,
|
|
109
|
+
buttonBorder: (0, _lodash.cloneDeep)(data.buttonBorder),
|
|
110
|
+
buttonIcon: (0, _lodash.cloneDeep)(data.buttonIcon),
|
|
111
|
+
buttonText: (0, _lodash.cloneDeep)(data.buttonText),
|
|
110
112
|
content: {
|
|
111
|
-
backgroundColor: data.content.backgroundColor
|
|
113
|
+
backgroundColor: (0, _lodash.cloneDeep)(data.content.backgroundColor)
|
|
112
114
|
}
|
|
113
115
|
}); // console.log('--ffd, button hover first click', data);
|
|
114
116
|
|
|
@@ -162,7 +164,7 @@ function (_super) {
|
|
|
162
164
|
|
|
163
165
|
var fontSizeKey = window.magicDesign.device == 'pc' ? 'pcFontSize' : 'fontSize';
|
|
164
166
|
|
|
165
|
-
var ButtonTextSetting = function ButtonTextSetting(
|
|
167
|
+
var ButtonTextSetting = function ButtonTextSetting(_data) {
|
|
166
168
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
167
169
|
title: (0, _locale.i18n)('FONT_STYLE')
|
|
168
170
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
@@ -171,24 +173,24 @@ function (_super) {
|
|
|
171
173
|
return t.key == v;
|
|
172
174
|
});
|
|
173
175
|
|
|
174
|
-
_extends(
|
|
176
|
+
_extends(_data, __assign(__assign({}, findOne), {
|
|
175
177
|
sizeType: findOne === null || findOne === void 0 ? void 0 : findOne.key
|
|
176
178
|
}));
|
|
177
179
|
|
|
178
180
|
_this.selfRender();
|
|
179
181
|
},
|
|
180
|
-
value:
|
|
182
|
+
value: _data.sizeType
|
|
181
183
|
}, _TextConfig.sizeTypeList.map(function (sizeType) {
|
|
182
184
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
183
185
|
value: sizeType.key
|
|
184
186
|
}, sizeType.key);
|
|
185
|
-
}))),
|
|
187
|
+
}))), _data.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
186
188
|
title: (0, _locale.i18n)('FONT_FAMILY')
|
|
187
189
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
188
190
|
onChange: function onChange(v) {
|
|
189
|
-
_this.updateAttr(
|
|
191
|
+
_this.updateAttr(_data, 'fontFamily', v);
|
|
190
192
|
},
|
|
191
|
-
value:
|
|
193
|
+
value: _data.fontFamily
|
|
192
194
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
193
195
|
value: "Montserrat"
|
|
194
196
|
}, "Montserrat"), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
@@ -197,9 +199,9 @@ function (_super) {
|
|
|
197
199
|
title: (0, _locale.i18n)('FONT_WEIGHT')
|
|
198
200
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
199
201
|
onChange: function onChange(v) {
|
|
200
|
-
_this.updateAttr(
|
|
202
|
+
_this.updateAttr(_data, 'fontWeight', v);
|
|
201
203
|
},
|
|
202
|
-
value:
|
|
204
|
+
value: _data.fontWeight
|
|
203
205
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
204
206
|
value: 400
|
|
205
207
|
}, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
@@ -210,34 +212,34 @@ function (_super) {
|
|
|
210
212
|
onChange: function onChange(_a) {
|
|
211
213
|
var count = _a.count;
|
|
212
214
|
|
|
213
|
-
_this.updateAttr(
|
|
215
|
+
_this.updateAttr(_data, fontSizeKey, count);
|
|
214
216
|
},
|
|
215
217
|
unit: "px",
|
|
216
218
|
value: {
|
|
217
|
-
count:
|
|
219
|
+
count: _data[fontSizeKey]
|
|
218
220
|
}
|
|
219
221
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
220
222
|
title: ""
|
|
221
223
|
}, /*#__PURE__*/_react["default"].createElement(_common.FontStyles, {
|
|
222
224
|
onChange: function onChange(value) {
|
|
223
|
-
_extends(
|
|
225
|
+
_extends(_data, value);
|
|
224
226
|
|
|
225
227
|
_this.selfRender();
|
|
226
228
|
},
|
|
227
|
-
value:
|
|
229
|
+
value: _data
|
|
228
230
|
})));
|
|
229
231
|
};
|
|
230
232
|
|
|
231
|
-
var ButtonBorderSetting = function ButtonBorderSetting(
|
|
233
|
+
var ButtonBorderSetting = function ButtonBorderSetting(_data) {
|
|
232
234
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
233
235
|
split: true,
|
|
234
236
|
title: (0, _locale.i18n)('BORDER_COLOR')
|
|
235
237
|
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
236
238
|
colorType: "rgba",
|
|
237
239
|
onChange: function onChange(value) {
|
|
238
|
-
_this.updateAttr(
|
|
240
|
+
_this.updateAttr(_data, 'borderColor', value);
|
|
239
241
|
},
|
|
240
|
-
value:
|
|
242
|
+
value: _data.borderColor
|
|
241
243
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
242
244
|
title: (0, _locale.i18n)('BORDER_RADIUS')
|
|
243
245
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
@@ -245,15 +247,15 @@ function (_super) {
|
|
|
245
247
|
onChange: function onChange(_a) {
|
|
246
248
|
var count = _a.count;
|
|
247
249
|
|
|
248
|
-
_this.updateAttr(
|
|
250
|
+
_this.updateAttr(_data, 'borderRadius', count);
|
|
249
251
|
},
|
|
250
252
|
value: {
|
|
251
|
-
count:
|
|
253
|
+
count: _data.borderRadius
|
|
252
254
|
}
|
|
253
255
|
})));
|
|
254
256
|
};
|
|
255
257
|
|
|
256
|
-
var ButtonIconSetting = function ButtonIconSetting(
|
|
258
|
+
var ButtonIconSetting = function ButtonIconSetting(_data) {
|
|
257
259
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
258
260
|
title: (0, _locale.i18n)('ICON')
|
|
259
261
|
}, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
|
|
@@ -262,18 +264,18 @@ function (_super) {
|
|
|
262
264
|
},
|
|
263
265
|
onClick: function onClick() {
|
|
264
266
|
_this.setState({
|
|
265
|
-
isHover:
|
|
267
|
+
isHover: _data == _this.props._data.hover.buttonIcon
|
|
266
268
|
});
|
|
267
269
|
},
|
|
268
|
-
value:
|
|
269
|
-
})),
|
|
270
|
+
value: _data.iconUrl
|
|
271
|
+
})), _data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
270
272
|
title: (0, _locale.i18n)('ICON_PLACEMENT')
|
|
271
273
|
}, /*#__PURE__*/_react["default"].createElement(_common.ButtonIconLayout, {
|
|
272
|
-
icon:
|
|
274
|
+
icon: _data.iconUrl,
|
|
273
275
|
onChange: function onChange(value) {
|
|
274
|
-
return _this.updateAttr(
|
|
276
|
+
return _this.updateAttr(_data, 'layout', value);
|
|
275
277
|
},
|
|
276
|
-
value:
|
|
278
|
+
value: _data.layout
|
|
277
279
|
})));
|
|
278
280
|
};
|
|
279
281
|
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -776,7 +776,7 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
776
776
|
if (typeof value === 'string' && value.endsWith('px')) {
|
|
777
777
|
remObj[key] = convertToRem(value.split('px')[0]);
|
|
778
778
|
} else if (typeof value === 'number') {
|
|
779
|
-
remObj[key] = ['opacity', 'lineHeight', 'zIndex'].includes(key) ? value : convertToRem(value);
|
|
779
|
+
remObj[key] = ['opacity', 'lineHeight', 'zIndex', 'fontWeight'].includes(key) ? value : convertToRem(value);
|
|
780
780
|
} else if ((key === 'padding' || key === 'margin') && typeof value === 'string') {
|
|
781
781
|
var paddingValues = value.split(' ');
|
|
782
782
|
var remPaddingValues = paddingValues.map(function (paddingValue) {
|
package/es/utils/currencyUtil.js
CHANGED
|
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
15
15
|
|
|
16
16
|
/* eslint-disable */
|
|
17
17
|
var precision = (0, _commonUtil.ensure)(function () {
|
|
18
|
-
return window.
|
|
18
|
+
return window.systemParams.precision;
|
|
19
19
|
}, '0'); // 千分位展示
|
|
20
20
|
|
|
21
21
|
var addSeparators = function addSeparators(nStr, thousandsSep, decimalSep) {
|
|
@@ -42,7 +42,7 @@ exports.addSeparators = addSeparators;
|
|
|
42
42
|
|
|
43
43
|
var getPricePrefix = function getPricePrefix() {
|
|
44
44
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
45
|
-
return window.
|
|
45
|
+
return window.systemParams.prefix;
|
|
46
46
|
}, 'Rp');
|
|
47
47
|
return pricePrefix;
|
|
48
48
|
};
|
|
@@ -51,7 +51,7 @@ exports.getPricePrefix = getPricePrefix;
|
|
|
51
51
|
|
|
52
52
|
var getPrecision = function getPrecision() {
|
|
53
53
|
var ret = (0, _commonUtil.ensure)(function () {
|
|
54
|
-
return window.
|
|
54
|
+
return window.systemParams.precision;
|
|
55
55
|
}, '0');
|
|
56
56
|
return Number(ret);
|
|
57
57
|
}; // 格式化金额
|
|
@@ -61,13 +61,13 @@ exports.getPrecision = getPrecision;
|
|
|
61
61
|
|
|
62
62
|
var formatCurrency = function formatCurrency(num) {
|
|
63
63
|
var displayPrecision = (0, _commonUtil.ensure)(function () {
|
|
64
|
-
return window.
|
|
64
|
+
return window.systemParams.displayCurrencyPrecision;
|
|
65
65
|
}, '0');
|
|
66
66
|
var precision = (0, _commonUtil.ensure)(function () {
|
|
67
|
-
return window.
|
|
67
|
+
return window.systemParams.precision;
|
|
68
68
|
}, '0');
|
|
69
69
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
70
|
-
return window.
|
|
70
|
+
return window.systemParams.prefix;
|
|
71
71
|
}, 'Rp');
|
|
72
72
|
var numVal = num;
|
|
73
73
|
|
|
@@ -162,7 +162,7 @@ var currencyToFont = function currencyToFont(value, customPrecision, customDispl
|
|
|
162
162
|
precision = Number(customPrecision);
|
|
163
163
|
} else {
|
|
164
164
|
precision = (0, _commonUtil.ensure)(function () {
|
|
165
|
-
return window.
|
|
165
|
+
return window.systemParams.precision;
|
|
166
166
|
}, '0');
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -180,7 +180,7 @@ var currencyToFont = function currencyToFont(value, customPrecision, customDispl
|
|
|
180
180
|
displayPrecision = Number(customDisplayPrecision);
|
|
181
181
|
} else {
|
|
182
182
|
displayPrecision = (0, _commonUtil.ensure)(function () {
|
|
183
|
-
return window.
|
|
183
|
+
return window.systemParams.displayCurrencyPrecision;
|
|
184
184
|
}, 'Rp');
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -447,7 +447,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
447
447
|
switch (_a.label) {
|
|
448
448
|
case 0:
|
|
449
449
|
precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
|
|
450
|
-
return window.
|
|
450
|
+
return window.systemParams.precision;
|
|
451
451
|
}, '0'));
|
|
452
452
|
params = {
|
|
453
453
|
catgIds: tValue.join(','),
|
|
@@ -383,7 +383,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
383
383
|
case 0:
|
|
384
384
|
return [4
|
|
385
385
|
/*yield*/
|
|
386
|
-
, (0, _commonUtil.commonFetch)(
|
|
386
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/storeoffercatgs", {}, 'GET')];
|
|
387
387
|
|
|
388
388
|
case 1:
|
|
389
389
|
res = _a.sent();
|
|
@@ -409,7 +409,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
409
409
|
case 0:
|
|
410
410
|
return [4
|
|
411
411
|
/*yield*/
|
|
412
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
412
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
|
|
413
413
|
|
|
414
414
|
case 1:
|
|
415
415
|
res = _a.sent();
|
|
Binary file
|
|
@@ -133,7 +133,7 @@ function (_super) {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
136
|
-
return window.
|
|
136
|
+
return window.systemParams.prefix;
|
|
137
137
|
}, 'Rp');
|
|
138
138
|
|
|
139
139
|
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
@@ -30,6 +30,26 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
30
30
|
pcImgHoverUrl: '',
|
|
31
31
|
h5ImgHoverUrl: ''
|
|
32
32
|
}
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
id: (0, _uuid.v4)(),
|
|
36
|
+
open: true,
|
|
37
|
+
type: 'TEXT',
|
|
38
|
+
specialContent: [],
|
|
39
|
+
text: 'Title',
|
|
40
|
+
content: {
|
|
41
|
+
sizeType: 'Customize font styles',
|
|
42
|
+
fontFamily: 'Open Sans',
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
fontSize: 16,
|
|
45
|
+
color: '#070707'
|
|
46
|
+
},
|
|
47
|
+
underline: {
|
|
48
|
+
open: false,
|
|
49
|
+
textDecorationColor: '',
|
|
50
|
+
textDecorationStyle: 'solid'
|
|
51
|
+
},
|
|
52
|
+
vertical: {}
|
|
33
53
|
}
|
|
34
54
|
},
|
|
35
55
|
spacing: {
|
|
@@ -337,14 +337,14 @@ function (_super) {
|
|
|
337
337
|
SignBoardMobile.prototype.render = function () {
|
|
338
338
|
var _this = this;
|
|
339
339
|
|
|
340
|
-
var _a;
|
|
340
|
+
var _a, _b;
|
|
341
341
|
|
|
342
342
|
var data = this.props.data; // console.log('--SignBoard', data);
|
|
343
343
|
|
|
344
|
-
var
|
|
345
|
-
storeInfo =
|
|
346
|
-
isFollow =
|
|
347
|
-
inputVal =
|
|
344
|
+
var _c = this.state,
|
|
345
|
+
storeInfo = _c.storeInfo,
|
|
346
|
+
isFollow = _c.isFollow,
|
|
347
|
+
inputVal = _c.inputVal;
|
|
348
348
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
349
349
|
className: "m-sign-board-bar"
|
|
350
350
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -377,9 +377,10 @@ function (_super) {
|
|
|
377
377
|
height: 44,
|
|
378
378
|
width: 44
|
|
379
379
|
}
|
|
380
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
381
|
-
className: "
|
|
382
|
-
|
|
380
|
+
})), data.content && ((_b = data.content.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
381
|
+
className: "card-text",
|
|
382
|
+
data: data.content.title
|
|
383
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
383
384
|
onClick: this.clickCollect
|
|
384
385
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
385
386
|
color: isFollow ? '#F1600F' : '#333333',
|
|
@@ -62,12 +62,3 @@
|
|
|
62
62
|
text-transform: uppercase;
|
|
63
63
|
color: #333333;
|
|
64
64
|
}
|
|
65
|
-
.m-sign-board-bar .store-info-wrap .store-name {
|
|
66
|
-
flex: 1;
|
|
67
|
-
margin-left: 0.24rem;
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
font-size: 0.32rem;
|
|
70
|
-
line-height: 0.4rem;
|
|
71
|
-
color: #070707;
|
|
72
|
-
font-family: 'Montserrat';
|
|
73
|
-
}
|
package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/conf
|
|
|
15
15
|
|
|
16
16
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
17
|
|
|
18
|
+
var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
19
|
+
|
|
18
20
|
var _locale = require("../../../../../locale");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -69,13 +71,21 @@ function (_super) {
|
|
|
69
71
|
SignBoardConfigContent.prototype.render = function () {
|
|
70
72
|
var panelProps = this.props.panelProps;
|
|
71
73
|
var source = [{
|
|
72
|
-
key: '
|
|
74
|
+
key: 'logo',
|
|
73
75
|
name: (0, _locale.i18n)('LOGO'),
|
|
74
76
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
75
77
|
data: panelProps.logo
|
|
76
78
|
}),
|
|
77
79
|
metaOption: panelProps.logo,
|
|
78
80
|
toggleType: 'switch'
|
|
81
|
+
}, {
|
|
82
|
+
key: 'title',
|
|
83
|
+
name: (0, _locale.i18n)('TITLE'),
|
|
84
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
85
|
+
data: panelProps.title
|
|
86
|
+
}),
|
|
87
|
+
metaOption: panelProps.title,
|
|
88
|
+
toggleType: 'switch'
|
|
79
89
|
}];
|
|
80
90
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
81
91
|
headerSize: "middle",
|
package/lib/decorator/index.js
CHANGED
|
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "metaDecorator", {
|
|
|
27
27
|
return _metaDecorator["default"];
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
exports.shouldUpdate = shouldUpdate;
|
|
30
31
|
Object.defineProperty(exports, "updateConfigDecorator", {
|
|
31
32
|
enumerable: true,
|
|
32
33
|
get: function get() {
|
|
@@ -42,4 +43,26 @@ var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecor
|
|
|
42
43
|
|
|
43
44
|
var _lazyLoadDecorator = require("./lazyLoadDecorator");
|
|
44
45
|
|
|
45
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
46
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
47
|
+
|
|
48
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
49
|
+
|
|
50
|
+
/** props 和 state 改变时才会render */
|
|
51
|
+
function shouldUpdate() {
|
|
52
|
+
return function (target, name, descriptor) {
|
|
53
|
+
var fn = descriptor.value;
|
|
54
|
+
|
|
55
|
+
descriptor.value = function (nextProps, nextState) {
|
|
56
|
+
var nowPropsJson = JSON.stringify(nextProps);
|
|
57
|
+
var nowStateJson = JSON.stringify(nextState);
|
|
58
|
+
var should1 = nowPropsJson != this.preProps;
|
|
59
|
+
var should2 = nowStateJson != this.preState;
|
|
60
|
+
this.preProps = nowPropsJson;
|
|
61
|
+
this.preState = nowStateJson;
|
|
62
|
+
var result = should1 || should2;
|
|
63
|
+
return result && fn.apply(this, {
|
|
64
|
+
nextProps: nextProps
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -93,6 +93,10 @@ function (_super) {
|
|
|
93
93
|
return _this;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
Button.prototype.shouldComponentUpdate = function () {
|
|
97
|
+
return true;
|
|
98
|
+
};
|
|
99
|
+
|
|
96
100
|
Button.prototype.render = function () {
|
|
97
101
|
var _this = this;
|
|
98
102
|
|
|
@@ -168,6 +172,9 @@ function (_super) {
|
|
|
168
172
|
className: '',
|
|
169
173
|
readonly: false
|
|
170
174
|
};
|
|
175
|
+
|
|
176
|
+
__decorate([(0, _decorator.shouldUpdate)()], Button.prototype, "shouldComponentUpdate", null);
|
|
177
|
+
|
|
171
178
|
Button = __decorate([_decorator.metaDecorator], Button);
|
|
172
179
|
return Button;
|
|
173
180
|
}(_react.Component);
|
|
@@ -203,6 +203,10 @@ function (_super) {
|
|
|
203
203
|
});
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
+
Text.prototype.shouldComponentUpdate = function () {
|
|
207
|
+
return true;
|
|
208
|
+
};
|
|
209
|
+
|
|
206
210
|
Text.prototype.render = function () {
|
|
207
211
|
var _a = this.props,
|
|
208
212
|
data = _a.data,
|
|
@@ -272,6 +276,9 @@ function (_super) {
|
|
|
272
276
|
readonly: false,
|
|
273
277
|
onTextInput: function onTextInput() {}
|
|
274
278
|
};
|
|
279
|
+
|
|
280
|
+
__decorate([(0, _decorator.shouldUpdate)()], Text.prototype, "shouldComponentUpdate", null);
|
|
281
|
+
|
|
275
282
|
Text = __decorate([_decorator.metaDecorator], Text);
|
|
276
283
|
return Text;
|
|
277
284
|
}(_react["default"].Component);
|
|
@@ -11,6 +11,8 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
|
|
14
16
|
var _locale = require("../../../locale");
|
|
15
17
|
|
|
16
18
|
var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
|
|
@@ -104,11 +106,11 @@ function (_super) {
|
|
|
104
106
|
|
|
105
107
|
_this.updateAttr(data, 'hover', {
|
|
106
108
|
open: true,
|
|
107
|
-
buttonBorder: data.buttonBorder,
|
|
108
|
-
buttonIcon: data.buttonIcon,
|
|
109
|
-
buttonText: data.buttonText,
|
|
109
|
+
buttonBorder: (0, _lodash.cloneDeep)(data.buttonBorder),
|
|
110
|
+
buttonIcon: (0, _lodash.cloneDeep)(data.buttonIcon),
|
|
111
|
+
buttonText: (0, _lodash.cloneDeep)(data.buttonText),
|
|
110
112
|
content: {
|
|
111
|
-
backgroundColor: data.content.backgroundColor
|
|
113
|
+
backgroundColor: (0, _lodash.cloneDeep)(data.content.backgroundColor)
|
|
112
114
|
}
|
|
113
115
|
}); // console.log('--ffd, button hover first click', data);
|
|
114
116
|
|
|
@@ -162,7 +164,7 @@ function (_super) {
|
|
|
162
164
|
|
|
163
165
|
var fontSizeKey = window.magicDesign.device == 'pc' ? 'pcFontSize' : 'fontSize';
|
|
164
166
|
|
|
165
|
-
var ButtonTextSetting = function ButtonTextSetting(
|
|
167
|
+
var ButtonTextSetting = function ButtonTextSetting(_data) {
|
|
166
168
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
167
169
|
title: (0, _locale.i18n)('FONT_STYLE')
|
|
168
170
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
@@ -171,24 +173,24 @@ function (_super) {
|
|
|
171
173
|
return t.key == v;
|
|
172
174
|
});
|
|
173
175
|
|
|
174
|
-
_extends(
|
|
176
|
+
_extends(_data, __assign(__assign({}, findOne), {
|
|
175
177
|
sizeType: findOne === null || findOne === void 0 ? void 0 : findOne.key
|
|
176
178
|
}));
|
|
177
179
|
|
|
178
180
|
_this.selfRender();
|
|
179
181
|
},
|
|
180
|
-
value:
|
|
182
|
+
value: _data.sizeType
|
|
181
183
|
}, _TextConfig.sizeTypeList.map(function (sizeType) {
|
|
182
184
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
183
185
|
value: sizeType.key
|
|
184
186
|
}, sizeType.key);
|
|
185
|
-
}))),
|
|
187
|
+
}))), _data.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
186
188
|
title: (0, _locale.i18n)('FONT_FAMILY')
|
|
187
189
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
188
190
|
onChange: function onChange(v) {
|
|
189
|
-
_this.updateAttr(
|
|
191
|
+
_this.updateAttr(_data, 'fontFamily', v);
|
|
190
192
|
},
|
|
191
|
-
value:
|
|
193
|
+
value: _data.fontFamily
|
|
192
194
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
193
195
|
value: "Montserrat"
|
|
194
196
|
}, "Montserrat"), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
@@ -197,9 +199,9 @@ function (_super) {
|
|
|
197
199
|
title: (0, _locale.i18n)('FONT_WEIGHT')
|
|
198
200
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
199
201
|
onChange: function onChange(v) {
|
|
200
|
-
_this.updateAttr(
|
|
202
|
+
_this.updateAttr(_data, 'fontWeight', v);
|
|
201
203
|
},
|
|
202
|
-
value:
|
|
204
|
+
value: _data.fontWeight
|
|
203
205
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
204
206
|
value: 400
|
|
205
207
|
}, (0, _locale.i18n)('REGULAR')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
@@ -210,34 +212,34 @@ function (_super) {
|
|
|
210
212
|
onChange: function onChange(_a) {
|
|
211
213
|
var count = _a.count;
|
|
212
214
|
|
|
213
|
-
_this.updateAttr(
|
|
215
|
+
_this.updateAttr(_data, fontSizeKey, count);
|
|
214
216
|
},
|
|
215
217
|
unit: "px",
|
|
216
218
|
value: {
|
|
217
|
-
count:
|
|
219
|
+
count: _data[fontSizeKey]
|
|
218
220
|
}
|
|
219
221
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
220
222
|
title: ""
|
|
221
223
|
}, /*#__PURE__*/_react["default"].createElement(_common.FontStyles, {
|
|
222
224
|
onChange: function onChange(value) {
|
|
223
|
-
_extends(
|
|
225
|
+
_extends(_data, value);
|
|
224
226
|
|
|
225
227
|
_this.selfRender();
|
|
226
228
|
},
|
|
227
|
-
value:
|
|
229
|
+
value: _data
|
|
228
230
|
})));
|
|
229
231
|
};
|
|
230
232
|
|
|
231
|
-
var ButtonBorderSetting = function ButtonBorderSetting(
|
|
233
|
+
var ButtonBorderSetting = function ButtonBorderSetting(_data) {
|
|
232
234
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
233
235
|
split: true,
|
|
234
236
|
title: (0, _locale.i18n)('BORDER_COLOR')
|
|
235
237
|
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
236
238
|
colorType: "rgba",
|
|
237
239
|
onChange: function onChange(value) {
|
|
238
|
-
_this.updateAttr(
|
|
240
|
+
_this.updateAttr(_data, 'borderColor', value);
|
|
239
241
|
},
|
|
240
|
-
value:
|
|
242
|
+
value: _data.borderColor
|
|
241
243
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
242
244
|
title: (0, _locale.i18n)('BORDER_RADIUS')
|
|
243
245
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
@@ -245,15 +247,15 @@ function (_super) {
|
|
|
245
247
|
onChange: function onChange(_a) {
|
|
246
248
|
var count = _a.count;
|
|
247
249
|
|
|
248
|
-
_this.updateAttr(
|
|
250
|
+
_this.updateAttr(_data, 'borderRadius', count);
|
|
249
251
|
},
|
|
250
252
|
value: {
|
|
251
|
-
count:
|
|
253
|
+
count: _data.borderRadius
|
|
252
254
|
}
|
|
253
255
|
})));
|
|
254
256
|
};
|
|
255
257
|
|
|
256
|
-
var ButtonIconSetting = function ButtonIconSetting(
|
|
258
|
+
var ButtonIconSetting = function ButtonIconSetting(_data) {
|
|
257
259
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
258
260
|
title: (0, _locale.i18n)('ICON')
|
|
259
261
|
}, /*#__PURE__*/_react["default"].createElement(_common.IconPicker, {
|
|
@@ -262,18 +264,18 @@ function (_super) {
|
|
|
262
264
|
},
|
|
263
265
|
onClick: function onClick() {
|
|
264
266
|
_this.setState({
|
|
265
|
-
isHover:
|
|
267
|
+
isHover: _data == _this.props._data.hover.buttonIcon
|
|
266
268
|
});
|
|
267
269
|
},
|
|
268
|
-
value:
|
|
269
|
-
})),
|
|
270
|
+
value: _data.iconUrl
|
|
271
|
+
})), _data.iconUrl && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
270
272
|
title: (0, _locale.i18n)('ICON_PLACEMENT')
|
|
271
273
|
}, /*#__PURE__*/_react["default"].createElement(_common.ButtonIconLayout, {
|
|
272
|
-
icon:
|
|
274
|
+
icon: _data.iconUrl,
|
|
273
275
|
onChange: function onChange(value) {
|
|
274
|
-
return _this.updateAttr(
|
|
276
|
+
return _this.updateAttr(_data, 'layout', value);
|
|
275
277
|
},
|
|
276
|
-
value:
|
|
278
|
+
value: _data.layout
|
|
277
279
|
})));
|
|
278
280
|
};
|
|
279
281
|
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -776,7 +776,7 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
776
776
|
if (typeof value === 'string' && value.endsWith('px')) {
|
|
777
777
|
remObj[key] = convertToRem(value.split('px')[0]);
|
|
778
778
|
} else if (typeof value === 'number') {
|
|
779
|
-
remObj[key] = ['opacity', 'lineHeight', 'zIndex'].includes(key) ? value : convertToRem(value);
|
|
779
|
+
remObj[key] = ['opacity', 'lineHeight', 'zIndex', 'fontWeight'].includes(key) ? value : convertToRem(value);
|
|
780
780
|
} else if ((key === 'padding' || key === 'margin') && typeof value === 'string') {
|
|
781
781
|
var paddingValues = value.split(' ');
|
|
782
782
|
var remPaddingValues = paddingValues.map(function (paddingValue) {
|
|
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
15
15
|
|
|
16
16
|
/* eslint-disable */
|
|
17
17
|
var precision = (0, _commonUtil.ensure)(function () {
|
|
18
|
-
return window.
|
|
18
|
+
return window.systemParams.precision;
|
|
19
19
|
}, '0'); // 千分位展示
|
|
20
20
|
|
|
21
21
|
var addSeparators = function addSeparators(nStr, thousandsSep, decimalSep) {
|
|
@@ -42,7 +42,7 @@ exports.addSeparators = addSeparators;
|
|
|
42
42
|
|
|
43
43
|
var getPricePrefix = function getPricePrefix() {
|
|
44
44
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
45
|
-
return window.
|
|
45
|
+
return window.systemParams.prefix;
|
|
46
46
|
}, 'Rp');
|
|
47
47
|
return pricePrefix;
|
|
48
48
|
};
|
|
@@ -51,7 +51,7 @@ exports.getPricePrefix = getPricePrefix;
|
|
|
51
51
|
|
|
52
52
|
var getPrecision = function getPrecision() {
|
|
53
53
|
var ret = (0, _commonUtil.ensure)(function () {
|
|
54
|
-
return window.
|
|
54
|
+
return window.systemParams.precision;
|
|
55
55
|
}, '0');
|
|
56
56
|
return Number(ret);
|
|
57
57
|
}; // 格式化金额
|
|
@@ -61,13 +61,13 @@ exports.getPrecision = getPrecision;
|
|
|
61
61
|
|
|
62
62
|
var formatCurrency = function formatCurrency(num) {
|
|
63
63
|
var displayPrecision = (0, _commonUtil.ensure)(function () {
|
|
64
|
-
return window.
|
|
64
|
+
return window.systemParams.displayCurrencyPrecision;
|
|
65
65
|
}, '0');
|
|
66
66
|
var precision = (0, _commonUtil.ensure)(function () {
|
|
67
|
-
return window.
|
|
67
|
+
return window.systemParams.precision;
|
|
68
68
|
}, '0');
|
|
69
69
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
70
|
-
return window.
|
|
70
|
+
return window.systemParams.prefix;
|
|
71
71
|
}, 'Rp');
|
|
72
72
|
var numVal = num;
|
|
73
73
|
|
|
@@ -162,7 +162,7 @@ var currencyToFont = function currencyToFont(value, customPrecision, customDispl
|
|
|
162
162
|
precision = Number(customPrecision);
|
|
163
163
|
} else {
|
|
164
164
|
precision = (0, _commonUtil.ensure)(function () {
|
|
165
|
-
return window.
|
|
165
|
+
return window.systemParams.precision;
|
|
166
166
|
}, '0');
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -180,7 +180,7 @@ var currencyToFont = function currencyToFont(value, customPrecision, customDispl
|
|
|
180
180
|
displayPrecision = Number(customDisplayPrecision);
|
|
181
181
|
} else {
|
|
182
182
|
displayPrecision = (0, _commonUtil.ensure)(function () {
|
|
183
|
-
return window.
|
|
183
|
+
return window.systemParams.displayCurrencyPrecision;
|
|
184
184
|
}, 'Rp');
|
|
185
185
|
}
|
|
186
186
|
|