easy3wmui 0.0.42-beta16 → 0.0.42-beta18
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.
|
@@ -35,26 +35,20 @@ var Easy3wMGlobalFooter = function (_Component) {
|
|
|
35
35
|
var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
|
|
36
36
|
|
|
37
37
|
_this.touchFooterStyle = function () {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
var element = document.getElementById('Easy3wMGlobalFooter');
|
|
39
|
+
var viewHeight = window.innerHeight; // 目标可视区的高度
|
|
40
|
+
var elementBottom = element.getBoundingClientRect().bottom; // 目标div上边框距离可视区的上边界的距离
|
|
41
|
+
// elementTop === viewHeight div上边框正好与可视区下边框重叠
|
|
42
|
+
if (elementBottom < viewHeight) {
|
|
43
|
+
// 达到目标区域
|
|
44
|
+
// console.log('div出现在可视区!');
|
|
45
|
+
_this.setState({
|
|
46
|
+
bottomFixed: true // 是否固定于页面底部
|
|
47
|
+
});
|
|
42
48
|
} else {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var element = document.getElementById('Easy3wMGlobalFooter');
|
|
47
|
-
// console.log('elementelement', element);
|
|
48
|
-
var viewHeight = window.innerHeight; // 目标可视区的高度
|
|
49
|
-
var elementBottom = element.getBoundingClientRect().bottom; // 目标div上边框距离可视区的上边界的距离
|
|
50
|
-
// elementTop === viewHeight div上边框正好与可视区下边框重叠
|
|
51
|
-
if (elementBottom < viewHeight) {
|
|
52
|
-
// 达到目标区域
|
|
53
|
-
// console.log('div出现在可视区!');
|
|
54
|
-
_this.setState({
|
|
55
|
-
bottomFixed: true // 是否固定于页面底部
|
|
56
|
-
});
|
|
57
|
-
}
|
|
49
|
+
_this.setState({
|
|
50
|
+
bottomFixed: false // 是否固定于页面底部
|
|
51
|
+
});
|
|
58
52
|
}
|
|
59
53
|
};
|
|
60
54
|
|
|
@@ -64,27 +58,23 @@ var Easy3wMGlobalFooter = function (_Component) {
|
|
|
64
58
|
return _this;
|
|
65
59
|
}
|
|
66
60
|
|
|
67
|
-
Easy3wMGlobalFooter.prototype.componentDidMount = function componentDidMount() {
|
|
68
|
-
var _this2 = this;
|
|
61
|
+
Easy3wMGlobalFooter.prototype.componentDidMount = function componentDidMount() {};
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
document.addEventListener('visibilitychange', _this2.touchFooterStyle);
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
Easy3wMGlobalFooter.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
76
|
-
document.removeEventListener('visibilitychange', this.touchFooterStyle);
|
|
77
|
-
};
|
|
63
|
+
Easy3wMGlobalFooter.prototype.componentWillUnmount = function componentWillUnmount() {};
|
|
78
64
|
// 底部样式监听
|
|
79
65
|
|
|
80
66
|
|
|
81
67
|
Easy3wMGlobalFooter.prototype.render = function render() {
|
|
82
68
|
var bottomFixed = this.state.bottomFixed;
|
|
83
69
|
var _props = this.props,
|
|
70
|
+
globalLoading = _props.globalLoading,
|
|
84
71
|
className = _props.className,
|
|
85
72
|
links = _props.links,
|
|
86
73
|
copyright = _props.copyright;
|
|
87
74
|
|
|
75
|
+
if (globalLoading === false) {
|
|
76
|
+
window.onload = this.touchFooterStyle;
|
|
77
|
+
}
|
|
88
78
|
var clsString = (0, _classnames2['default'])(className, { bottomFixed: bottomFixed });
|
|
89
79
|
return _react2['default'].createElement(
|
|
90
80
|
'div',
|
|
@@ -80,7 +80,8 @@ var Easy3wMInsideLayout = function (_Component) {
|
|
|
80
80
|
includeCopyRightFlag = _props.includeCopyRightFlag,
|
|
81
81
|
links = _props.links,
|
|
82
82
|
copyrightContent = _props.copyrightContent,
|
|
83
|
-
routeDataLayout = _props.routeDataLayout
|
|
83
|
+
routeDataLayout = _props.routeDataLayout,
|
|
84
|
+
globalLoading = _props.globalLoading;
|
|
84
85
|
|
|
85
86
|
var hadHaederFlag = includeHeaderFlag !== '0';
|
|
86
87
|
var copyRightFlag = includeCopyRightFlag !== '0';
|
|
@@ -120,6 +121,7 @@ var Easy3wMInsideLayout = function (_Component) {
|
|
|
120
121
|
)
|
|
121
122
|
),
|
|
122
123
|
copyRightFlag ? _react2['default'].createElement(_Easy3wMGlobalFooter2['default'], {
|
|
124
|
+
globalLoading: globalLoading,
|
|
123
125
|
links: links,
|
|
124
126
|
copyright: copyright
|
|
125
127
|
}) : ''
|
|
@@ -78,6 +78,7 @@ var Easy3wMUserLayout = function (_PureComponent) {
|
|
|
78
78
|
copyrightContent = _props.copyrightContent,
|
|
79
79
|
headerElem = _props.headerElem,
|
|
80
80
|
links = _props.links,
|
|
81
|
+
globalLoading = _props.globalLoading,
|
|
81
82
|
rootRedirectPath = _props.rootRedirectPath,
|
|
82
83
|
routeDataLayout = _props.routeDataLayout,
|
|
83
84
|
backImg = _props.backImg,
|
|
@@ -123,6 +124,7 @@ var Easy3wMUserLayout = function (_PureComponent) {
|
|
|
123
124
|
)
|
|
124
125
|
),
|
|
125
126
|
copyRightFlag ? _react2['default'].createElement(_Easy3wMGlobalFooter2['default'], {
|
|
127
|
+
globalLoading: globalLoading,
|
|
126
128
|
links: links,
|
|
127
129
|
copyright: copyright
|
|
128
130
|
}) : ''
|