@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.
@@ -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
@@ -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.forEach(function (child) {
783
- // 兼容新开发的功能: video新增播放按钮 的设置
784
- if (child.type === 'VIDEO') {
785
- console.log('--compatibleNewPageData -- video ');
786
- child.groupSource.forEach(function (group) {
787
- if (!group.playIcon) {
788
- console.log('--compatibleNewPageData -- video add group.playIcon ');
789
- group.playIcon = {
790
- open: true,
791
- parentId: group.id,
792
- id: (0, _uuid.v4)(),
793
- type: 'PLAY',
794
- size: 48,
795
- pcSize: 60,
796
- iconType: 'light-playicon-01',
797
- iconColor: 'Light'
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
@@ -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.forEach(function (child) {
783
- // 兼容新开发的功能: video新增播放按钮 的设置
784
- if (child.type === 'VIDEO') {
785
- console.log('--compatibleNewPageData -- video ');
786
- child.groupSource.forEach(function (group) {
787
- if (!group.playIcon) {
788
- console.log('--compatibleNewPageData -- video add group.playIcon ');
789
- group.playIcon = {
790
- open: true,
791
- parentId: group.id,
792
- id: (0, _uuid.v4)(),
793
- type: 'PLAY',
794
- size: 48,
795
- pcSize: 60,
796
- iconType: 'light-playicon-01',
797
- iconColor: 'Light'
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.65",
4
+ "version": "0.1.67",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",