@fonixtree/magic-design 0.1.65 → 0.1.67
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/core/Designer/index.js +2 -0
- package/es/utils/commonUtil.js +23 -21
- package/lib/core/Designer/index.js +2 -0
- package/lib/utils/commonUtil.js +23 -21
- package/package.json +1 -1
|
@@ -615,6 +615,7 @@ function (_super) {
|
|
|
615
615
|
config = props.config,
|
|
616
616
|
outputType = props.outputType,
|
|
617
617
|
locale = props.locale;
|
|
618
|
+
console.log('constructor-- pageData', pageData);
|
|
618
619
|
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
619
620
|
var MPageData = pageData.childNodes || [];
|
|
620
621
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
@@ -666,6 +667,7 @@ function (_super) {
|
|
|
666
667
|
var pageData = nextProps.pageData,
|
|
667
668
|
config = nextProps.config;
|
|
668
669
|
var MPageData = pageData.childNodes || [];
|
|
670
|
+
console.log('componentWillReceiveProps-- pageData', pageData);
|
|
669
671
|
this.history = new _History["default"](MPageData);
|
|
670
672
|
this.setState({
|
|
671
673
|
MPageData: MPageData
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -779,27 +779,29 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
779
779
|
exports.pxToRem = pxToRem;
|
|
780
780
|
|
|
781
781
|
var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
782
|
-
pageData.childNodes.
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
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
|
+
}
|
|
803
805
|
};
|
|
804
806
|
|
|
805
807
|
exports.compatibleNewPageData = compatibleNewPageData;
|
|
@@ -615,6 +615,7 @@ function (_super) {
|
|
|
615
615
|
config = props.config,
|
|
616
616
|
outputType = props.outputType,
|
|
617
617
|
locale = props.locale;
|
|
618
|
+
console.log('constructor-- pageData', pageData);
|
|
618
619
|
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
619
620
|
var MPageData = pageData.childNodes || [];
|
|
620
621
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
@@ -666,6 +667,7 @@ function (_super) {
|
|
|
666
667
|
var pageData = nextProps.pageData,
|
|
667
668
|
config = nextProps.config;
|
|
668
669
|
var MPageData = pageData.childNodes || [];
|
|
670
|
+
console.log('componentWillReceiveProps-- pageData', pageData);
|
|
669
671
|
this.history = new _History["default"](MPageData);
|
|
670
672
|
this.setState({
|
|
671
673
|
MPageData: MPageData
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -779,27 +779,29 @@ var pxToRem = function pxToRem(styleObj) {
|
|
|
779
779
|
exports.pxToRem = pxToRem;
|
|
780
780
|
|
|
781
781
|
var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
782
|
-
pageData.childNodes.
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
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
|
+
}
|
|
803
805
|
};
|
|
804
806
|
|
|
805
807
|
exports.compatibleNewPageData = compatibleNewPageData;
|