@fonixtree/magic-design 0.1.53 → 0.1.55
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/fonts/.DS_Store +0 -0
- package/es/assets/less/cylon-antd.less +0 -1
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +3 -3
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +2 -2
- package/es/meta-comp/config-panels/TextConfig/index.js +28 -20
- package/es/utils/commonUtil.js +8 -6
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/less/cylon-antd.less +0 -1
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +3 -3
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +2 -2
- package/lib/meta-comp/config-panels/TextConfig/index.js +28 -20
- package/lib/utils/commonUtil.js +8 -6
- package/package.json +1 -1
|
Binary file
|
|
@@ -331,10 +331,10 @@ function (_super) {
|
|
|
331
331
|
};
|
|
332
332
|
|
|
333
333
|
SignBoardMobile.prototype.render = function () {
|
|
334
|
-
var _this = this;
|
|
334
|
+
var _this = this; // const { data } = this.props;
|
|
335
|
+
// console.log('--SignBoard', data);
|
|
336
|
+
|
|
335
337
|
|
|
336
|
-
var data = this.props.data;
|
|
337
|
-
console.log('--SignBoard', data);
|
|
338
338
|
var _a = this.state,
|
|
339
339
|
storeInfo = _a.storeInfo,
|
|
340
340
|
isFollow = _a.isFollow,
|
|
@@ -321,8 +321,8 @@ function (_super) {
|
|
|
321
321
|
SignBoardPc.prototype.render = function () {
|
|
322
322
|
var _this = this;
|
|
323
323
|
|
|
324
|
-
var data = this.props.data;
|
|
325
|
-
|
|
324
|
+
var data = this.props.data; // console.log('--SignBoardPc data', data);
|
|
325
|
+
|
|
326
326
|
var _a = this.state,
|
|
327
327
|
storeInfo = _a.storeInfo,
|
|
328
328
|
isFollow = _a.isFollow,
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
|
|
14
|
+
var _coreUtil = require("src/components/utils/coreUtil");
|
|
15
|
+
|
|
14
16
|
var _TextLabel = _interopRequireDefault(require("./TextLabel"));
|
|
15
17
|
|
|
16
18
|
var _locale = require("../../../locale");
|
|
@@ -81,56 +83,56 @@ var sizeTypeList = [{
|
|
|
81
83
|
}, {
|
|
82
84
|
key: 'Headline 1',
|
|
83
85
|
fontFamily: 'Montserrat',
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
fontSize: 42,
|
|
87
|
+
pcFontSize: 52,
|
|
86
88
|
fontWeight: 600
|
|
87
89
|
}, {
|
|
88
90
|
key: 'Headline 2',
|
|
89
91
|
fontFamily: 'Montserrat',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
fontSize: 32,
|
|
93
|
+
pcFontSize: 42,
|
|
92
94
|
fontWeight: 600
|
|
93
95
|
}, {
|
|
94
96
|
key: 'Headline 3',
|
|
95
97
|
fontFamily: 'Montserrat',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
fontSize: 30,
|
|
99
|
+
pcFontSize: 38,
|
|
98
100
|
fontWeight: 600
|
|
99
101
|
}, {
|
|
100
102
|
key: 'Title 1',
|
|
101
103
|
fontFamily: 'Montserrat',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
fontSize: 28,
|
|
105
|
+
pcFontSize: 32,
|
|
104
106
|
fontWeight: 400
|
|
105
107
|
}, {
|
|
106
108
|
key: 'Title 2',
|
|
107
109
|
fontFamily: 'Montserrat',
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
fontSize: 20,
|
|
111
|
+
pcFontSize: 24,
|
|
110
112
|
fontWeight: 400
|
|
111
113
|
}, {
|
|
112
114
|
key: 'Title 3',
|
|
113
115
|
fontFamily: 'Montserrat',
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
fontSize: 18,
|
|
117
|
+
pcFontSize: 20,
|
|
116
118
|
fontWeight: 400
|
|
117
119
|
}, {
|
|
118
120
|
key: 'Body 1',
|
|
119
121
|
fontFamily: 'Open Sans',
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
pcFontSize: 18,
|
|
122
124
|
fontWeight: 400
|
|
123
125
|
}, {
|
|
124
126
|
key: 'Body 2',
|
|
125
127
|
fontFamily: 'Open Sans',
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
pcFontSize: 16,
|
|
128
130
|
fontWeight: 400
|
|
129
131
|
}, {
|
|
130
132
|
key: 'Body 3',
|
|
131
133
|
fontFamily: 'Open Sans',
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
fontSize: 12,
|
|
135
|
+
pcFontSize: 14,
|
|
134
136
|
fontWeight: 400
|
|
135
137
|
}];
|
|
136
138
|
exports.sizeTypeList = sizeTypeList;
|
|
@@ -206,6 +208,12 @@ function (_super) {
|
|
|
206
208
|
}, sizeTypeList.map(function (sizeType) {
|
|
207
209
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
208
210
|
key: sizeType.key,
|
|
211
|
+
style: {
|
|
212
|
+
lineHeight: '1.1em',
|
|
213
|
+
fontFamily: sizeType.fontFamily,
|
|
214
|
+
fontWeight: sizeType.fontWeight,
|
|
215
|
+
fontSize: (0, _coreUtil.isPc)() ? sizeType.fontSize : sizeType.fontSize
|
|
216
|
+
},
|
|
209
217
|
value: sizeType.key
|
|
210
218
|
}, sizeType.key);
|
|
211
219
|
}))), textData.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
@@ -241,7 +249,7 @@ function (_super) {
|
|
|
241
249
|
var count = _a.count;
|
|
242
250
|
|
|
243
251
|
if (window.magicDesign.device == 'pc') {
|
|
244
|
-
textData.
|
|
252
|
+
textData.fontSize = count;
|
|
245
253
|
} else {
|
|
246
254
|
textData.fontSize = count;
|
|
247
255
|
}
|
|
@@ -250,7 +258,7 @@ function (_super) {
|
|
|
250
258
|
},
|
|
251
259
|
unit: "px",
|
|
252
260
|
value: {
|
|
253
|
-
count: window.magicDesign.device == 'pc' ? textData.
|
|
261
|
+
count: window.magicDesign.device == 'pc' ? textData.fontSize : textData.fontSize
|
|
254
262
|
}
|
|
255
263
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
256
264
|
title: ""
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -717,9 +717,10 @@ var asyncNextTick = function asyncNextTick(asyncFunc, interval, count) {
|
|
|
717
717
|
exports.asyncNextTick = asyncNextTick;
|
|
718
718
|
|
|
719
719
|
var convertToRem = function convertToRem(value) {
|
|
720
|
-
return value;
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
// return value; // PTO项目 解开注释
|
|
721
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {
|
|
722
|
+
return value;
|
|
723
|
+
}
|
|
723
724
|
|
|
724
725
|
var pxValue = parseFloat(value);
|
|
725
726
|
var remValue = pxValue / 50; // 假设1rem = 50px
|
|
@@ -732,9 +733,10 @@ var convertToRem = function convertToRem(value) {
|
|
|
732
733
|
exports.convertToRem = convertToRem;
|
|
733
734
|
|
|
734
735
|
var pxToRem = function pxToRem(styleObj) {
|
|
735
|
-
return styleObj;
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
// return styleObj; // PTO项目 解开注释
|
|
737
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {
|
|
738
|
+
return styleObj;
|
|
739
|
+
}
|
|
738
740
|
|
|
739
741
|
var remObj = {};
|
|
740
742
|
|
|
Binary file
|
|
@@ -331,10 +331,10 @@ function (_super) {
|
|
|
331
331
|
};
|
|
332
332
|
|
|
333
333
|
SignBoardMobile.prototype.render = function () {
|
|
334
|
-
var _this = this;
|
|
334
|
+
var _this = this; // const { data } = this.props;
|
|
335
|
+
// console.log('--SignBoard', data);
|
|
336
|
+
|
|
335
337
|
|
|
336
|
-
var data = this.props.data;
|
|
337
|
-
console.log('--SignBoard', data);
|
|
338
338
|
var _a = this.state,
|
|
339
339
|
storeInfo = _a.storeInfo,
|
|
340
340
|
isFollow = _a.isFollow,
|
|
@@ -321,8 +321,8 @@ function (_super) {
|
|
|
321
321
|
SignBoardPc.prototype.render = function () {
|
|
322
322
|
var _this = this;
|
|
323
323
|
|
|
324
|
-
var data = this.props.data;
|
|
325
|
-
|
|
324
|
+
var data = this.props.data; // console.log('--SignBoardPc data', data);
|
|
325
|
+
|
|
326
326
|
var _a = this.state,
|
|
327
327
|
storeInfo = _a.storeInfo,
|
|
328
328
|
isFollow = _a.isFollow,
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
|
|
14
|
+
var _coreUtil = require("src/components/utils/coreUtil");
|
|
15
|
+
|
|
14
16
|
var _TextLabel = _interopRequireDefault(require("./TextLabel"));
|
|
15
17
|
|
|
16
18
|
var _locale = require("../../../locale");
|
|
@@ -81,56 +83,56 @@ var sizeTypeList = [{
|
|
|
81
83
|
}, {
|
|
82
84
|
key: 'Headline 1',
|
|
83
85
|
fontFamily: 'Montserrat',
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
fontSize: 42,
|
|
87
|
+
pcFontSize: 52,
|
|
86
88
|
fontWeight: 600
|
|
87
89
|
}, {
|
|
88
90
|
key: 'Headline 2',
|
|
89
91
|
fontFamily: 'Montserrat',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
fontSize: 32,
|
|
93
|
+
pcFontSize: 42,
|
|
92
94
|
fontWeight: 600
|
|
93
95
|
}, {
|
|
94
96
|
key: 'Headline 3',
|
|
95
97
|
fontFamily: 'Montserrat',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
fontSize: 30,
|
|
99
|
+
pcFontSize: 38,
|
|
98
100
|
fontWeight: 600
|
|
99
101
|
}, {
|
|
100
102
|
key: 'Title 1',
|
|
101
103
|
fontFamily: 'Montserrat',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
fontSize: 28,
|
|
105
|
+
pcFontSize: 32,
|
|
104
106
|
fontWeight: 400
|
|
105
107
|
}, {
|
|
106
108
|
key: 'Title 2',
|
|
107
109
|
fontFamily: 'Montserrat',
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
fontSize: 20,
|
|
111
|
+
pcFontSize: 24,
|
|
110
112
|
fontWeight: 400
|
|
111
113
|
}, {
|
|
112
114
|
key: 'Title 3',
|
|
113
115
|
fontFamily: 'Montserrat',
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
fontSize: 18,
|
|
117
|
+
pcFontSize: 20,
|
|
116
118
|
fontWeight: 400
|
|
117
119
|
}, {
|
|
118
120
|
key: 'Body 1',
|
|
119
121
|
fontFamily: 'Open Sans',
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
pcFontSize: 18,
|
|
122
124
|
fontWeight: 400
|
|
123
125
|
}, {
|
|
124
126
|
key: 'Body 2',
|
|
125
127
|
fontFamily: 'Open Sans',
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
pcFontSize: 16,
|
|
128
130
|
fontWeight: 400
|
|
129
131
|
}, {
|
|
130
132
|
key: 'Body 3',
|
|
131
133
|
fontFamily: 'Open Sans',
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
fontSize: 12,
|
|
135
|
+
pcFontSize: 14,
|
|
134
136
|
fontWeight: 400
|
|
135
137
|
}];
|
|
136
138
|
exports.sizeTypeList = sizeTypeList;
|
|
@@ -206,6 +208,12 @@ function (_super) {
|
|
|
206
208
|
}, sizeTypeList.map(function (sizeType) {
|
|
207
209
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
208
210
|
key: sizeType.key,
|
|
211
|
+
style: {
|
|
212
|
+
lineHeight: '1.1em',
|
|
213
|
+
fontFamily: sizeType.fontFamily,
|
|
214
|
+
fontWeight: sizeType.fontWeight,
|
|
215
|
+
fontSize: (0, _coreUtil.isPc)() ? sizeType.fontSize : sizeType.fontSize
|
|
216
|
+
},
|
|
209
217
|
value: sizeType.key
|
|
210
218
|
}, sizeType.key);
|
|
211
219
|
}))), textData.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
@@ -241,7 +249,7 @@ function (_super) {
|
|
|
241
249
|
var count = _a.count;
|
|
242
250
|
|
|
243
251
|
if (window.magicDesign.device == 'pc') {
|
|
244
|
-
textData.
|
|
252
|
+
textData.fontSize = count;
|
|
245
253
|
} else {
|
|
246
254
|
textData.fontSize = count;
|
|
247
255
|
}
|
|
@@ -250,7 +258,7 @@ function (_super) {
|
|
|
250
258
|
},
|
|
251
259
|
unit: "px",
|
|
252
260
|
value: {
|
|
253
|
-
count: window.magicDesign.device == 'pc' ? textData.
|
|
261
|
+
count: window.magicDesign.device == 'pc' ? textData.fontSize : textData.fontSize
|
|
254
262
|
}
|
|
255
263
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
256
264
|
title: ""
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -717,9 +717,10 @@ var asyncNextTick = function asyncNextTick(asyncFunc, interval, count) {
|
|
|
717
717
|
exports.asyncNextTick = asyncNextTick;
|
|
718
718
|
|
|
719
719
|
var convertToRem = function convertToRem(value) {
|
|
720
|
-
return value;
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
// return value; // PTO项目 解开注释
|
|
721
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {
|
|
722
|
+
return value;
|
|
723
|
+
}
|
|
723
724
|
|
|
724
725
|
var pxValue = parseFloat(value);
|
|
725
726
|
var remValue = pxValue / 50; // 假设1rem = 50px
|
|
@@ -732,9 +733,10 @@ var convertToRem = function convertToRem(value) {
|
|
|
732
733
|
exports.convertToRem = convertToRem;
|
|
733
734
|
|
|
734
735
|
var pxToRem = function pxToRem(styleObj) {
|
|
735
|
-
return styleObj;
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
// return styleObj; // PTO项目 解开注释
|
|
737
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {
|
|
738
|
+
return styleObj;
|
|
739
|
+
}
|
|
738
740
|
|
|
739
741
|
var remObj = {};
|
|
740
742
|
|