@fonixtree/magic-design 2.0.197 → 2.0.200
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/assets/less/common.less +12 -0
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -1
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +5 -1
- package/es/composite-comp/public/components/Location/mobile/index.js +1 -1
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +7 -2
- package/es/utils/businessUtil.js +4 -2
- package/lib/assets/less/common.less +12 -0
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -1
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +5 -1
- package/lib/composite-comp/public/components/Location/mobile/index.js +1 -1
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +7 -2
- package/lib/utils/businessUtil.js +4 -2
- package/package.json +1 -1
|
@@ -85,6 +85,18 @@
|
|
|
85
85
|
text-overflow: ellipsis;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
.two_row {
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
-webkit-line-clamp: 2;
|
|
91
|
+
-webkit-box-orient: vertical;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
line-height: 1.5em;
|
|
95
|
+
/* 设置行高 */
|
|
96
|
+
max-height: 3em;
|
|
97
|
+
/* 行高的两倍,因为最多显示两行 */
|
|
98
|
+
}
|
|
99
|
+
|
|
88
100
|
.common_mask {
|
|
89
101
|
position: fixed;
|
|
90
102
|
top: 0;
|
package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _common = require("../../../../../common");
|
|
|
15
15
|
|
|
16
16
|
var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
|
|
17
17
|
|
|
18
|
+
var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
|
|
19
|
+
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
19
21
|
|
|
20
22
|
var _locale = require("../../../../../locale");
|
|
@@ -213,7 +215,9 @@ function (_super) {
|
|
|
213
215
|
key: 'search6',
|
|
214
216
|
name: (0, _locale.i18n)('POINTS'),
|
|
215
217
|
toggleType: 'switch',
|
|
216
|
-
value:
|
|
218
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
219
|
+
data: panelProps.points
|
|
220
|
+
}),
|
|
217
221
|
metaOption: panelProps.points
|
|
218
222
|
}];
|
|
219
223
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
@@ -116,7 +116,7 @@ function (_super) {
|
|
|
116
116
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
117
|
className: "text"
|
|
118
118
|
}, panelProps.content.address.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
119
|
-
className: "address
|
|
119
|
+
className: "address two_row",
|
|
120
120
|
data: __assign(__assign({}, panelProps.content.address), {
|
|
121
121
|
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS') : locationInfo.address
|
|
122
122
|
})
|
|
@@ -93,6 +93,11 @@ function (_super) {
|
|
|
93
93
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
94
94
|
|
|
95
95
|
_this.state = {};
|
|
96
|
+
|
|
97
|
+
_this.formatDistance = function (val) {
|
|
98
|
+
return (Number(val) / 1000).toFixed(2).replace(/(\.0+|0+)$/, '');
|
|
99
|
+
};
|
|
100
|
+
|
|
96
101
|
return _this;
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -172,7 +177,7 @@ function (_super) {
|
|
|
172
177
|
}), distance.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
173
178
|
className: "distance",
|
|
174
179
|
data: __assign(__assign({}, distance), {
|
|
175
|
-
text: (data.distance
|
|
180
|
+
text: this.formatDistance(data.distance) + " " + (0, _locale.i18n)('KM')
|
|
176
181
|
}),
|
|
177
182
|
readonly: true
|
|
178
183
|
})))) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
@@ -244,7 +249,7 @@ function (_super) {
|
|
|
244
249
|
}), distance.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
245
250
|
className: "distance",
|
|
246
251
|
data: __assign(__assign({}, distance), {
|
|
247
|
-
text: (data.distance
|
|
252
|
+
text: this.formatDistance(data.distance) + " " + (0, _locale.i18n)('KM')
|
|
248
253
|
}),
|
|
249
254
|
readonly: true
|
|
250
255
|
})))));
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -299,7 +299,8 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
299
299
|
'/search-page': 'SEARCH_PAGE',
|
|
300
300
|
'/commission': 'COMMISSION',
|
|
301
301
|
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
302
|
-
'/location': 'ADDRESS_PAGE'
|
|
302
|
+
'/location': 'ADDRESS_PAGE',
|
|
303
|
+
'/my-points': 'POINT_PAGE'
|
|
303
304
|
};
|
|
304
305
|
var typeTemp = map[link];
|
|
305
306
|
|
|
@@ -478,7 +479,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
478
479
|
'/main/my-commission': 'WALLET',
|
|
479
480
|
'/commission': 'COMMISSION',
|
|
480
481
|
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
481
|
-
'/location': 'ADDRESS_PAGE'
|
|
482
|
+
'/location': 'ADDRESS_PAGE',
|
|
483
|
+
'/my-points': 'POINT_PAGE'
|
|
482
484
|
};
|
|
483
485
|
link = url;
|
|
484
486
|
params = {
|
|
@@ -85,6 +85,18 @@
|
|
|
85
85
|
text-overflow: ellipsis;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
.two_row {
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
-webkit-line-clamp: 2;
|
|
91
|
+
-webkit-box-orient: vertical;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
line-height: 1.5em;
|
|
95
|
+
/* 设置行高 */
|
|
96
|
+
max-height: 3em;
|
|
97
|
+
/* 行高的两倍,因为最多显示两行 */
|
|
98
|
+
}
|
|
99
|
+
|
|
88
100
|
.common_mask {
|
|
89
101
|
position: fixed;
|
|
90
102
|
top: 0;
|
package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _common = require("../../../../../common");
|
|
|
15
15
|
|
|
16
16
|
var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
|
|
17
17
|
|
|
18
|
+
var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
|
|
19
|
+
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
19
21
|
|
|
20
22
|
var _locale = require("../../../../../locale");
|
|
@@ -213,7 +215,9 @@ function (_super) {
|
|
|
213
215
|
key: 'search6',
|
|
214
216
|
name: (0, _locale.i18n)('POINTS'),
|
|
215
217
|
toggleType: 'switch',
|
|
216
|
-
value:
|
|
218
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
219
|
+
data: panelProps.points
|
|
220
|
+
}),
|
|
217
221
|
metaOption: panelProps.points
|
|
218
222
|
}];
|
|
219
223
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
@@ -116,7 +116,7 @@ function (_super) {
|
|
|
116
116
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
117
|
className: "text"
|
|
118
118
|
}, panelProps.content.address.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
119
|
-
className: "address
|
|
119
|
+
className: "address two_row",
|
|
120
120
|
data: __assign(__assign({}, panelProps.content.address), {
|
|
121
121
|
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS') : locationInfo.address
|
|
122
122
|
})
|
|
@@ -93,6 +93,11 @@ function (_super) {
|
|
|
93
93
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
94
94
|
|
|
95
95
|
_this.state = {};
|
|
96
|
+
|
|
97
|
+
_this.formatDistance = function (val) {
|
|
98
|
+
return (Number(val) / 1000).toFixed(2).replace(/(\.0+|0+)$/, '');
|
|
99
|
+
};
|
|
100
|
+
|
|
96
101
|
return _this;
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -172,7 +177,7 @@ function (_super) {
|
|
|
172
177
|
}), distance.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
173
178
|
className: "distance",
|
|
174
179
|
data: __assign(__assign({}, distance), {
|
|
175
|
-
text: (data.distance
|
|
180
|
+
text: this.formatDistance(data.distance) + " " + (0, _locale.i18n)('KM')
|
|
176
181
|
}),
|
|
177
182
|
readonly: true
|
|
178
183
|
})))) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
@@ -244,7 +249,7 @@ function (_super) {
|
|
|
244
249
|
}), distance.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
245
250
|
className: "distance",
|
|
246
251
|
data: __assign(__assign({}, distance), {
|
|
247
|
-
text: (data.distance
|
|
252
|
+
text: this.formatDistance(data.distance) + " " + (0, _locale.i18n)('KM')
|
|
248
253
|
}),
|
|
249
254
|
readonly: true
|
|
250
255
|
})))));
|
|
@@ -299,7 +299,8 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
299
299
|
'/search-page': 'SEARCH_PAGE',
|
|
300
300
|
'/commission': 'COMMISSION',
|
|
301
301
|
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
302
|
-
'/location': 'ADDRESS_PAGE'
|
|
302
|
+
'/location': 'ADDRESS_PAGE',
|
|
303
|
+
'/my-points': 'POINT_PAGE'
|
|
303
304
|
};
|
|
304
305
|
var typeTemp = map[link];
|
|
305
306
|
|
|
@@ -478,7 +479,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
478
479
|
'/main/my-commission': 'WALLET',
|
|
479
480
|
'/commission': 'COMMISSION',
|
|
480
481
|
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
481
|
-
'/location': 'ADDRESS_PAGE'
|
|
482
|
+
'/location': 'ADDRESS_PAGE',
|
|
483
|
+
'/my-points': 'POINT_PAGE'
|
|
482
484
|
};
|
|
483
485
|
link = url;
|
|
484
486
|
params = {
|