@fonixtree/magic-design 0.1.63 → 0.1.66
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/composite-comp/bol/components/Video/index.js +4 -2
- package/es/core/Designer/index.js +1 -0
- package/es/utils/commonUtil.js +37 -1
- package/lib/composite-comp/bol/components/Video/index.js +4 -2
- package/lib/core/Designer/index.js +1 -0
- package/lib/utils/commonUtil.js +37 -1
- package/package.json +1 -1
|
@@ -71,15 +71,17 @@ function (_super) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
Video.prototype.componentWillMount = function () {
|
|
74
|
-
// 兼容新开发的功能: video新增播放按钮 的设置
|
|
74
|
+
console.log('--video WillMount'); // 兼容新开发的功能: video新增播放按钮 的设置
|
|
75
|
+
|
|
75
76
|
var nodeData = this.props.nodeData;
|
|
76
77
|
|
|
77
78
|
if (nodeData.groupSource && nodeData.groupSource.length > 0) {
|
|
78
79
|
nodeData.groupSource.forEach(function (group) {
|
|
79
80
|
if (!group.playIcon) {
|
|
81
|
+
console.log('--video add group.playIcon ');
|
|
80
82
|
group.playIcon = {
|
|
81
83
|
open: true,
|
|
82
|
-
parentId:
|
|
84
|
+
parentId: group.id,
|
|
83
85
|
id: (0, _uuid.v4)(),
|
|
84
86
|
type: 'PLAY',
|
|
85
87
|
size: 48,
|
|
@@ -615,6 +615,7 @@ function (_super) {
|
|
|
615
615
|
config = props.config,
|
|
616
616
|
outputType = props.outputType,
|
|
617
617
|
locale = props.locale;
|
|
618
|
+
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
618
619
|
var MPageData = pageData.childNodes || [];
|
|
619
620
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
620
621
|
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.addZero = exports.addUrlQuery = void 0;
|
|
|
7
7
|
exports.asyncDataURLtoImage = asyncDataURLtoImage;
|
|
8
8
|
exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
9
9
|
exports.commonFetch = commonFetch;
|
|
10
|
+
exports.compatibleNewPageData = void 0;
|
|
10
11
|
exports.convertImageUrl = convertImageUrl;
|
|
11
12
|
exports.convertToRem = void 0;
|
|
12
13
|
exports.copy2ClipBoard = copy2ClipBoard;
|
|
@@ -28,6 +29,8 @@ var _axios = _interopRequireDefault(require("axios"));
|
|
|
28
29
|
|
|
29
30
|
var _lodash = require("lodash");
|
|
30
31
|
|
|
32
|
+
var _uuid = require("uuid");
|
|
33
|
+
|
|
31
34
|
var _qs = _interopRequireDefault(require("qs"));
|
|
32
35
|
|
|
33
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -767,5 +770,38 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
767
770
|
|
|
768
771
|
return remObj;
|
|
769
772
|
};
|
|
773
|
+
/**
|
|
774
|
+
* 处理新老数据兼容问题
|
|
775
|
+
* @param pageData 大JSON
|
|
776
|
+
*/
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
exports.pxToRem = pxToRem;
|
|
780
|
+
|
|
781
|
+
var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
782
|
+
if (pageData.childNodes && pageData.childNodes.length > 0) {
|
|
783
|
+
pageData.childNodes.forEach(function (child) {
|
|
784
|
+
// 兼容新开发的功能: video新增播放按钮 的设置
|
|
785
|
+
if (child.type === 'VIDEO') {
|
|
786
|
+
console.log('--compatibleNewPageData -- video ');
|
|
787
|
+
child.groupSource.forEach(function (group) {
|
|
788
|
+
if (!group.playIcon) {
|
|
789
|
+
console.log('--compatibleNewPageData -- video add group.playIcon ');
|
|
790
|
+
group.playIcon = {
|
|
791
|
+
open: true,
|
|
792
|
+
parentId: group.id,
|
|
793
|
+
id: (0, _uuid.v4)(),
|
|
794
|
+
type: 'PLAY',
|
|
795
|
+
size: 48,
|
|
796
|
+
pcSize: 60,
|
|
797
|
+
iconType: 'light-playicon-01',
|
|
798
|
+
iconColor: 'Light'
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
};
|
|
770
806
|
|
|
771
|
-
exports.
|
|
807
|
+
exports.compatibleNewPageData = compatibleNewPageData;
|
|
@@ -71,15 +71,17 @@ function (_super) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
Video.prototype.componentWillMount = function () {
|
|
74
|
-
// 兼容新开发的功能: video新增播放按钮 的设置
|
|
74
|
+
console.log('--video WillMount'); // 兼容新开发的功能: video新增播放按钮 的设置
|
|
75
|
+
|
|
75
76
|
var nodeData = this.props.nodeData;
|
|
76
77
|
|
|
77
78
|
if (nodeData.groupSource && nodeData.groupSource.length > 0) {
|
|
78
79
|
nodeData.groupSource.forEach(function (group) {
|
|
79
80
|
if (!group.playIcon) {
|
|
81
|
+
console.log('--video add group.playIcon ');
|
|
80
82
|
group.playIcon = {
|
|
81
83
|
open: true,
|
|
82
|
-
parentId:
|
|
84
|
+
parentId: group.id,
|
|
83
85
|
id: (0, _uuid.v4)(),
|
|
84
86
|
type: 'PLAY',
|
|
85
87
|
size: 48,
|
|
@@ -615,6 +615,7 @@ function (_super) {
|
|
|
615
615
|
config = props.config,
|
|
616
616
|
outputType = props.outputType,
|
|
617
617
|
locale = props.locale;
|
|
618
|
+
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
618
619
|
var MPageData = pageData.childNodes || [];
|
|
619
620
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
620
621
|
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.addZero = exports.addUrlQuery = void 0;
|
|
|
7
7
|
exports.asyncDataURLtoImage = asyncDataURLtoImage;
|
|
8
8
|
exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
9
9
|
exports.commonFetch = commonFetch;
|
|
10
|
+
exports.compatibleNewPageData = void 0;
|
|
10
11
|
exports.convertImageUrl = convertImageUrl;
|
|
11
12
|
exports.convertToRem = void 0;
|
|
12
13
|
exports.copy2ClipBoard = copy2ClipBoard;
|
|
@@ -28,6 +29,8 @@ var _axios = _interopRequireDefault(require("axios"));
|
|
|
28
29
|
|
|
29
30
|
var _lodash = require("lodash");
|
|
30
31
|
|
|
32
|
+
var _uuid = require("uuid");
|
|
33
|
+
|
|
31
34
|
var _qs = _interopRequireDefault(require("qs"));
|
|
32
35
|
|
|
33
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -767,5 +770,38 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
767
770
|
|
|
768
771
|
return remObj;
|
|
769
772
|
};
|
|
773
|
+
/**
|
|
774
|
+
* 处理新老数据兼容问题
|
|
775
|
+
* @param pageData 大JSON
|
|
776
|
+
*/
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
exports.pxToRem = pxToRem;
|
|
780
|
+
|
|
781
|
+
var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
782
|
+
if (pageData.childNodes && pageData.childNodes.length > 0) {
|
|
783
|
+
pageData.childNodes.forEach(function (child) {
|
|
784
|
+
// 兼容新开发的功能: video新增播放按钮 的设置
|
|
785
|
+
if (child.type === 'VIDEO') {
|
|
786
|
+
console.log('--compatibleNewPageData -- video ');
|
|
787
|
+
child.groupSource.forEach(function (group) {
|
|
788
|
+
if (!group.playIcon) {
|
|
789
|
+
console.log('--compatibleNewPageData -- video add group.playIcon ');
|
|
790
|
+
group.playIcon = {
|
|
791
|
+
open: true,
|
|
792
|
+
parentId: group.id,
|
|
793
|
+
id: (0, _uuid.v4)(),
|
|
794
|
+
type: 'PLAY',
|
|
795
|
+
size: 48,
|
|
796
|
+
pcSize: 60,
|
|
797
|
+
iconType: 'light-playicon-01',
|
|
798
|
+
iconColor: 'Light'
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
};
|
|
770
806
|
|
|
771
|
-
exports.
|
|
807
|
+
exports.compatibleNewPageData = compatibleNewPageData;
|