@fonixtree/magic-design 0.1.67 → 0.1.69
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/Banner/index.js +14 -42
- package/es/composite-comp/bol/components/Video/index.js +22 -26
- package/es/core/Designer/index.js +17 -7
- package/es/utils/commonUtil.js +43 -4
- package/lib/composite-comp/bol/components/Banner/index.js +14 -42
- package/lib/composite-comp/bol/components/Video/index.js +22 -26
- package/lib/core/Designer/index.js +17 -7
- package/lib/utils/commonUtil.js +43 -4
- package/package.json +1 -1
|
@@ -49,22 +49,6 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
49
49
|
};
|
|
50
50
|
}();
|
|
51
51
|
|
|
52
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
53
|
-
__assign = Object.assign || function (t) {
|
|
54
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
55
|
-
s = arguments[i];
|
|
56
|
-
|
|
57
|
-
for (var p in s) {
|
|
58
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return t;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return __assign.apply(this, arguments);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
52
|
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
69
53
|
var c = arguments.length,
|
|
70
54
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -82,33 +66,21 @@ function (_super) {
|
|
|
82
66
|
|
|
83
67
|
function Banner() {
|
|
84
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
85
|
-
}
|
|
69
|
+
} // componentWillMount() {
|
|
70
|
+
// // 兼容新功能: 轮播的 dots 点 区分pc 移动
|
|
71
|
+
// const { nodeData } = this.props;
|
|
72
|
+
// if (!nodeData.setting.dots.color.pc || !nodeData.setting.dots.hoverColor.pc || !nodeData.setting.dots.size.pc) {
|
|
73
|
+
// nodeData.setting.dots = { ...nodeData.setting.dots,
|
|
74
|
+
// ...{
|
|
75
|
+
// color: { pc: '#fff', mobile: '#fff' },
|
|
76
|
+
// hoverColor: { pc: '#fff', mobile: '#fff' },
|
|
77
|
+
// size: { pc: 16, mobile: 8 },
|
|
78
|
+
// hoverSize: { pc: 16, mobile: 8 },
|
|
79
|
+
// },
|
|
80
|
+
// };
|
|
81
|
+
// }
|
|
82
|
+
// }
|
|
86
83
|
|
|
87
|
-
Banner.prototype.componentWillMount = function () {
|
|
88
|
-
// 兼容新功能: 轮播的 dots 点 区分pc 移动
|
|
89
|
-
var nodeData = this.props.nodeData;
|
|
90
|
-
|
|
91
|
-
if (!nodeData.setting.dots.color.pc || !nodeData.setting.dots.hoverColor.pc || !nodeData.setting.dots.size.pc) {
|
|
92
|
-
nodeData.setting.dots = __assign(__assign({}, nodeData.setting.dots), {
|
|
93
|
-
color: {
|
|
94
|
-
pc: '#fff',
|
|
95
|
-
mobile: '#fff'
|
|
96
|
-
},
|
|
97
|
-
hoverColor: {
|
|
98
|
-
pc: '#fff',
|
|
99
|
-
mobile: '#fff'
|
|
100
|
-
},
|
|
101
|
-
size: {
|
|
102
|
-
pc: 16,
|
|
103
|
-
mobile: 8
|
|
104
|
-
},
|
|
105
|
-
hoverSize: {
|
|
106
|
-
pc: 16,
|
|
107
|
-
mobile: 8
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
84
|
|
|
113
85
|
Banner.prototype.render = function () {
|
|
114
86
|
var nodeData = this.props.nodeData; // console.log('---banner', nodeData);
|
|
@@ -7,8 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
-
var _uuid = require("uuid");
|
|
11
|
-
|
|
12
10
|
var _pc = _interopRequireDefault(require("./pc"));
|
|
13
11
|
|
|
14
12
|
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
@@ -68,31 +66,29 @@ function (_super) {
|
|
|
68
66
|
|
|
69
67
|
function Video() {
|
|
70
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
-
}
|
|
69
|
+
} // componentWillMount() {
|
|
70
|
+
// console.log('--video WillMount');
|
|
71
|
+
// // 兼容新开发的功能: video新增播放按钮 的设置
|
|
72
|
+
// const { nodeData } = this.props;
|
|
73
|
+
// if (nodeData.groupSource && nodeData.groupSource.length > 0) {
|
|
74
|
+
// nodeData.groupSource.forEach(group => {
|
|
75
|
+
// if (!group.playIcon) {
|
|
76
|
+
// console.log('--video add group.playIcon ');
|
|
77
|
+
// group.playIcon = {
|
|
78
|
+
// open: true,
|
|
79
|
+
// parentId: group.id,
|
|
80
|
+
// id: uuidv4(),
|
|
81
|
+
// type: 'PLAY',
|
|
82
|
+
// size: 48,
|
|
83
|
+
// pcSize: 60,
|
|
84
|
+
// iconType: 'light-playicon-01',
|
|
85
|
+
// iconColor: 'Light',
|
|
86
|
+
// };
|
|
87
|
+
// }
|
|
88
|
+
// });
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
72
91
|
|
|
73
|
-
Video.prototype.componentWillMount = function () {
|
|
74
|
-
console.log('--video WillMount'); // 兼容新开发的功能: video新增播放按钮 的设置
|
|
75
|
-
|
|
76
|
-
var nodeData = this.props.nodeData;
|
|
77
|
-
|
|
78
|
-
if (nodeData.groupSource && nodeData.groupSource.length > 0) {
|
|
79
|
-
nodeData.groupSource.forEach(function (group) {
|
|
80
|
-
if (!group.playIcon) {
|
|
81
|
-
console.log('--video add group.playIcon ');
|
|
82
|
-
group.playIcon = {
|
|
83
|
-
open: true,
|
|
84
|
-
parentId: group.id,
|
|
85
|
-
id: (0, _uuid.v4)(),
|
|
86
|
-
type: 'PLAY',
|
|
87
|
-
size: 48,
|
|
88
|
-
pcSize: 60,
|
|
89
|
-
iconType: 'light-playicon-01',
|
|
90
|
-
iconColor: 'Light'
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
92
|
|
|
97
93
|
Video.prototype.render = function () {
|
|
98
94
|
var nodeData = this.props.nodeData; // console.log('---Video', nodeData);
|
|
@@ -614,9 +614,8 @@ function (_super) {
|
|
|
614
614
|
var pageData = props.pageData,
|
|
615
615
|
config = props.config,
|
|
616
616
|
outputType = props.outputType,
|
|
617
|
-
locale = props.locale;
|
|
618
|
-
|
|
619
|
-
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
617
|
+
locale = props.locale; // console.log('constructor-- pageData', pageData);
|
|
618
|
+
|
|
620
619
|
var MPageData = pageData.childNodes || [];
|
|
621
620
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
622
621
|
|
|
@@ -644,12 +643,19 @@ function (_super) {
|
|
|
644
643
|
}
|
|
645
644
|
|
|
646
645
|
Designer.prototype.componentDidMount = function () {
|
|
647
|
-
var _this = this;
|
|
646
|
+
var _this = this;
|
|
647
|
+
|
|
648
|
+
var _a; // 复合组件点击事件
|
|
648
649
|
|
|
649
650
|
|
|
650
651
|
window.document.addEventListener('component-click', this.componentClick); // 复合组件重新渲染事件
|
|
651
652
|
|
|
652
|
-
window.document.addEventListener('render-view', this.reRenderViewArea);
|
|
653
|
+
window.document.addEventListener('render-view', this.reRenderViewArea); // 兼容 旧组件新增 新功能的问题(本地)
|
|
654
|
+
|
|
655
|
+
if ((_a = this.props.pageData) === null || _a === void 0 ? void 0 : _a.childNodes) {
|
|
656
|
+
(0, _commonUtil.compatibleNewPageData)(this.props.pageData);
|
|
657
|
+
}
|
|
658
|
+
|
|
653
659
|
this.destory = (0, _mobx.autorun)(function () {
|
|
654
660
|
var stateObj = {
|
|
655
661
|
imgGenVisible: _mobx.store.imgGenVisible
|
|
@@ -666,8 +672,12 @@ function (_super) {
|
|
|
666
672
|
Designer.prototype.componentWillReceiveProps = function (nextProps) {
|
|
667
673
|
var pageData = nextProps.pageData,
|
|
668
674
|
config = nextProps.config;
|
|
669
|
-
var MPageData = pageData.childNodes || [];
|
|
670
|
-
|
|
675
|
+
var MPageData = pageData.childNodes || []; // 兼容 旧组件新增 新功能的问题(线上)
|
|
676
|
+
|
|
677
|
+
if (pageData === null || pageData === void 0 ? void 0 : pageData.childNodes) {
|
|
678
|
+
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
679
|
+
}
|
|
680
|
+
|
|
671
681
|
this.history = new _History["default"](MPageData);
|
|
672
682
|
this.setState({
|
|
673
683
|
MPageData: MPageData
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -35,6 +35,22 @@ var _qs = _interopRequireDefault(require("qs"));
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
37
|
|
|
38
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
39
|
+
__assign = Object.assign || function (t) {
|
|
40
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
41
|
+
s = arguments[i];
|
|
42
|
+
|
|
43
|
+
for (var p in s) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return t;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return __assign.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
|
|
38
54
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
39
55
|
function adopt(value) {
|
|
40
56
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -781,12 +797,35 @@ exports.pxToRem = pxToRem;
|
|
|
781
797
|
var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
782
798
|
if (pageData.childNodes && pageData.childNodes.length > 0) {
|
|
783
799
|
pageData.childNodes.forEach(function (child) {
|
|
784
|
-
//
|
|
800
|
+
// 兼容新功能:banner 轮播的 dots 点 区分pc 移动
|
|
801
|
+
if (child.type === 'BANNER') {
|
|
802
|
+
if (!child.setting.dots.color.pc || !child.setting.dots.hoverColor.pc || !child.setting.dots.size.pc) {
|
|
803
|
+
child.setting.dots = __assign(__assign({}, child.setting.dots), {
|
|
804
|
+
color: {
|
|
805
|
+
pc: '#fff',
|
|
806
|
+
mobile: '#fff'
|
|
807
|
+
},
|
|
808
|
+
hoverColor: {
|
|
809
|
+
pc: '#fff',
|
|
810
|
+
mobile: '#fff'
|
|
811
|
+
},
|
|
812
|
+
size: {
|
|
813
|
+
pc: 16,
|
|
814
|
+
mobile: 8
|
|
815
|
+
},
|
|
816
|
+
hoverSize: {
|
|
817
|
+
pc: 16,
|
|
818
|
+
mobile: 8
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
} // 兼容新开发的功能: video新增播放按钮 的设置
|
|
823
|
+
|
|
824
|
+
|
|
785
825
|
if (child.type === 'VIDEO') {
|
|
786
|
-
console.log('--compatibleNewPageData -- video ');
|
|
826
|
+
// console.log('--compatibleNewPageData -- video ');
|
|
787
827
|
child.groupSource.forEach(function (group) {
|
|
788
828
|
if (!group.playIcon) {
|
|
789
|
-
console.log('--compatibleNewPageData -- video add group.playIcon ');
|
|
790
829
|
group.playIcon = {
|
|
791
830
|
open: true,
|
|
792
831
|
parentId: group.id,
|
|
@@ -798,7 +837,7 @@ var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
|
798
837
|
iconColor: 'Light'
|
|
799
838
|
};
|
|
800
839
|
}
|
|
801
|
-
});
|
|
840
|
+
}); // console.log('--compatibleNewPageData -- video add group.playIcon ', child.groupSource);
|
|
802
841
|
}
|
|
803
842
|
});
|
|
804
843
|
}
|
|
@@ -49,22 +49,6 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
49
49
|
};
|
|
50
50
|
}();
|
|
51
51
|
|
|
52
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
53
|
-
__assign = Object.assign || function (t) {
|
|
54
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
55
|
-
s = arguments[i];
|
|
56
|
-
|
|
57
|
-
for (var p in s) {
|
|
58
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return t;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return __assign.apply(this, arguments);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
52
|
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
69
53
|
var c = arguments.length,
|
|
70
54
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -82,33 +66,21 @@ function (_super) {
|
|
|
82
66
|
|
|
83
67
|
function Banner() {
|
|
84
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
85
|
-
}
|
|
69
|
+
} // componentWillMount() {
|
|
70
|
+
// // 兼容新功能: 轮播的 dots 点 区分pc 移动
|
|
71
|
+
// const { nodeData } = this.props;
|
|
72
|
+
// if (!nodeData.setting.dots.color.pc || !nodeData.setting.dots.hoverColor.pc || !nodeData.setting.dots.size.pc) {
|
|
73
|
+
// nodeData.setting.dots = { ...nodeData.setting.dots,
|
|
74
|
+
// ...{
|
|
75
|
+
// color: { pc: '#fff', mobile: '#fff' },
|
|
76
|
+
// hoverColor: { pc: '#fff', mobile: '#fff' },
|
|
77
|
+
// size: { pc: 16, mobile: 8 },
|
|
78
|
+
// hoverSize: { pc: 16, mobile: 8 },
|
|
79
|
+
// },
|
|
80
|
+
// };
|
|
81
|
+
// }
|
|
82
|
+
// }
|
|
86
83
|
|
|
87
|
-
Banner.prototype.componentWillMount = function () {
|
|
88
|
-
// 兼容新功能: 轮播的 dots 点 区分pc 移动
|
|
89
|
-
var nodeData = this.props.nodeData;
|
|
90
|
-
|
|
91
|
-
if (!nodeData.setting.dots.color.pc || !nodeData.setting.dots.hoverColor.pc || !nodeData.setting.dots.size.pc) {
|
|
92
|
-
nodeData.setting.dots = __assign(__assign({}, nodeData.setting.dots), {
|
|
93
|
-
color: {
|
|
94
|
-
pc: '#fff',
|
|
95
|
-
mobile: '#fff'
|
|
96
|
-
},
|
|
97
|
-
hoverColor: {
|
|
98
|
-
pc: '#fff',
|
|
99
|
-
mobile: '#fff'
|
|
100
|
-
},
|
|
101
|
-
size: {
|
|
102
|
-
pc: 16,
|
|
103
|
-
mobile: 8
|
|
104
|
-
},
|
|
105
|
-
hoverSize: {
|
|
106
|
-
pc: 16,
|
|
107
|
-
mobile: 8
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
84
|
|
|
113
85
|
Banner.prototype.render = function () {
|
|
114
86
|
var nodeData = this.props.nodeData; // console.log('---banner', nodeData);
|
|
@@ -7,8 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
-
var _uuid = require("uuid");
|
|
11
|
-
|
|
12
10
|
var _pc = _interopRequireDefault(require("./pc"));
|
|
13
11
|
|
|
14
12
|
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
@@ -68,31 +66,29 @@ function (_super) {
|
|
|
68
66
|
|
|
69
67
|
function Video() {
|
|
70
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
-
}
|
|
69
|
+
} // componentWillMount() {
|
|
70
|
+
// console.log('--video WillMount');
|
|
71
|
+
// // 兼容新开发的功能: video新增播放按钮 的设置
|
|
72
|
+
// const { nodeData } = this.props;
|
|
73
|
+
// if (nodeData.groupSource && nodeData.groupSource.length > 0) {
|
|
74
|
+
// nodeData.groupSource.forEach(group => {
|
|
75
|
+
// if (!group.playIcon) {
|
|
76
|
+
// console.log('--video add group.playIcon ');
|
|
77
|
+
// group.playIcon = {
|
|
78
|
+
// open: true,
|
|
79
|
+
// parentId: group.id,
|
|
80
|
+
// id: uuidv4(),
|
|
81
|
+
// type: 'PLAY',
|
|
82
|
+
// size: 48,
|
|
83
|
+
// pcSize: 60,
|
|
84
|
+
// iconType: 'light-playicon-01',
|
|
85
|
+
// iconColor: 'Light',
|
|
86
|
+
// };
|
|
87
|
+
// }
|
|
88
|
+
// });
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
72
91
|
|
|
73
|
-
Video.prototype.componentWillMount = function () {
|
|
74
|
-
console.log('--video WillMount'); // 兼容新开发的功能: video新增播放按钮 的设置
|
|
75
|
-
|
|
76
|
-
var nodeData = this.props.nodeData;
|
|
77
|
-
|
|
78
|
-
if (nodeData.groupSource && nodeData.groupSource.length > 0) {
|
|
79
|
-
nodeData.groupSource.forEach(function (group) {
|
|
80
|
-
if (!group.playIcon) {
|
|
81
|
-
console.log('--video add group.playIcon ');
|
|
82
|
-
group.playIcon = {
|
|
83
|
-
open: true,
|
|
84
|
-
parentId: group.id,
|
|
85
|
-
id: (0, _uuid.v4)(),
|
|
86
|
-
type: 'PLAY',
|
|
87
|
-
size: 48,
|
|
88
|
-
pcSize: 60,
|
|
89
|
-
iconType: 'light-playicon-01',
|
|
90
|
-
iconColor: 'Light'
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
92
|
|
|
97
93
|
Video.prototype.render = function () {
|
|
98
94
|
var nodeData = this.props.nodeData; // console.log('---Video', nodeData);
|
|
@@ -614,9 +614,8 @@ function (_super) {
|
|
|
614
614
|
var pageData = props.pageData,
|
|
615
615
|
config = props.config,
|
|
616
616
|
outputType = props.outputType,
|
|
617
|
-
locale = props.locale;
|
|
618
|
-
|
|
619
|
-
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
617
|
+
locale = props.locale; // console.log('constructor-- pageData', pageData);
|
|
618
|
+
|
|
620
619
|
var MPageData = pageData.childNodes || [];
|
|
621
620
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
622
621
|
|
|
@@ -644,12 +643,19 @@ function (_super) {
|
|
|
644
643
|
}
|
|
645
644
|
|
|
646
645
|
Designer.prototype.componentDidMount = function () {
|
|
647
|
-
var _this = this;
|
|
646
|
+
var _this = this;
|
|
647
|
+
|
|
648
|
+
var _a; // 复合组件点击事件
|
|
648
649
|
|
|
649
650
|
|
|
650
651
|
window.document.addEventListener('component-click', this.componentClick); // 复合组件重新渲染事件
|
|
651
652
|
|
|
652
|
-
window.document.addEventListener('render-view', this.reRenderViewArea);
|
|
653
|
+
window.document.addEventListener('render-view', this.reRenderViewArea); // 兼容 旧组件新增 新功能的问题(本地)
|
|
654
|
+
|
|
655
|
+
if ((_a = this.props.pageData) === null || _a === void 0 ? void 0 : _a.childNodes) {
|
|
656
|
+
(0, _commonUtil.compatibleNewPageData)(this.props.pageData);
|
|
657
|
+
}
|
|
658
|
+
|
|
653
659
|
this.destory = (0, _mobx.autorun)(function () {
|
|
654
660
|
var stateObj = {
|
|
655
661
|
imgGenVisible: _mobx.store.imgGenVisible
|
|
@@ -666,8 +672,12 @@ function (_super) {
|
|
|
666
672
|
Designer.prototype.componentWillReceiveProps = function (nextProps) {
|
|
667
673
|
var pageData = nextProps.pageData,
|
|
668
674
|
config = nextProps.config;
|
|
669
|
-
var MPageData = pageData.childNodes || [];
|
|
670
|
-
|
|
675
|
+
var MPageData = pageData.childNodes || []; // 兼容 旧组件新增 新功能的问题(线上)
|
|
676
|
+
|
|
677
|
+
if (pageData === null || pageData === void 0 ? void 0 : pageData.childNodes) {
|
|
678
|
+
(0, _commonUtil.compatibleNewPageData)(pageData);
|
|
679
|
+
}
|
|
680
|
+
|
|
671
681
|
this.history = new _History["default"](MPageData);
|
|
672
682
|
this.setState({
|
|
673
683
|
MPageData: MPageData
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -35,6 +35,22 @@ var _qs = _interopRequireDefault(require("qs"));
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
37
|
|
|
38
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
39
|
+
__assign = Object.assign || function (t) {
|
|
40
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
41
|
+
s = arguments[i];
|
|
42
|
+
|
|
43
|
+
for (var p in s) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return t;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return __assign.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
|
|
38
54
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
39
55
|
function adopt(value) {
|
|
40
56
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -781,12 +797,35 @@ exports.pxToRem = pxToRem;
|
|
|
781
797
|
var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
782
798
|
if (pageData.childNodes && pageData.childNodes.length > 0) {
|
|
783
799
|
pageData.childNodes.forEach(function (child) {
|
|
784
|
-
//
|
|
800
|
+
// 兼容新功能:banner 轮播的 dots 点 区分pc 移动
|
|
801
|
+
if (child.type === 'BANNER') {
|
|
802
|
+
if (!child.setting.dots.color.pc || !child.setting.dots.hoverColor.pc || !child.setting.dots.size.pc) {
|
|
803
|
+
child.setting.dots = __assign(__assign({}, child.setting.dots), {
|
|
804
|
+
color: {
|
|
805
|
+
pc: '#fff',
|
|
806
|
+
mobile: '#fff'
|
|
807
|
+
},
|
|
808
|
+
hoverColor: {
|
|
809
|
+
pc: '#fff',
|
|
810
|
+
mobile: '#fff'
|
|
811
|
+
},
|
|
812
|
+
size: {
|
|
813
|
+
pc: 16,
|
|
814
|
+
mobile: 8
|
|
815
|
+
},
|
|
816
|
+
hoverSize: {
|
|
817
|
+
pc: 16,
|
|
818
|
+
mobile: 8
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
} // 兼容新开发的功能: video新增播放按钮 的设置
|
|
823
|
+
|
|
824
|
+
|
|
785
825
|
if (child.type === 'VIDEO') {
|
|
786
|
-
console.log('--compatibleNewPageData -- video ');
|
|
826
|
+
// console.log('--compatibleNewPageData -- video ');
|
|
787
827
|
child.groupSource.forEach(function (group) {
|
|
788
828
|
if (!group.playIcon) {
|
|
789
|
-
console.log('--compatibleNewPageData -- video add group.playIcon ');
|
|
790
829
|
group.playIcon = {
|
|
791
830
|
open: true,
|
|
792
831
|
parentId: group.id,
|
|
@@ -798,7 +837,7 @@ var compatibleNewPageData = function compatibleNewPageData(pageData) {
|
|
|
798
837
|
iconColor: 'Light'
|
|
799
838
|
};
|
|
800
839
|
}
|
|
801
|
-
});
|
|
840
|
+
}); // console.log('--compatibleNewPageData -- video add group.playIcon ', child.groupSource);
|
|
802
841
|
}
|
|
803
842
|
});
|
|
804
843
|
}
|