easy3wmui 0.0.42-beta17 → 0.0.42-beta19

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.
@@ -29,49 +29,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
29
29
  var Easy3wMGlobalFooter = function (_Component) {
30
30
  (0, _inherits3['default'])(Easy3wMGlobalFooter, _Component);
31
31
 
32
- function Easy3wMGlobalFooter(props) {
32
+ function Easy3wMGlobalFooter() {
33
33
  (0, _classCallCheck3['default'])(this, Easy3wMGlobalFooter);
34
-
35
- var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
36
-
37
- _this.touchFooterStyle = function () {
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
- });
48
- } else {
49
- _this.setState({
50
- bottomFixed: false // 是否固定于页面底部
51
- });
52
- }
53
- };
54
-
55
- _this.state = {
56
- bottomFixed: false // 是否固定于页面底部
57
- };
58
- return _this;
34
+ return (0, _possibleConstructorReturn3['default'])(this, _Component.apply(this, arguments));
59
35
  }
60
36
 
61
- Easy3wMGlobalFooter.prototype.componentDidMount = function componentDidMount() {
62
- window.onhashchange = this.touchFooterStyle;
63
- window.onload = this.touchFooterStyle;
64
- };
65
-
66
- Easy3wMGlobalFooter.prototype.componentWillUnmount = function componentWillUnmount() {
67
- window.onhashchange = null;
68
- };
69
- // 底部样式监听
70
-
71
-
72
37
  Easy3wMGlobalFooter.prototype.render = function render() {
73
- var bottomFixed = this.state.bottomFixed;
74
38
  var _props = this.props,
39
+ bottomFixed = _props.bottomFixed,
75
40
  className = _props.className,
76
41
  links = _props.links,
77
42
  copyright = _props.copyright;
@@ -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
+ bottomFixed = _props.bottomFixed;
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
+ bottomFixed: bottomFixed,
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
+ bottomFixed = _props.bottomFixed,
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
+ bottomFixed: bottomFixed,
126
128
  links: links,
127
129
  copyright: copyright
128
130
  }) : ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wmui",
3
- "version": "0.0.42-beta17",
3
+ "version": "0.0.42-beta19",
4
4
  "description": "easy3wmui components for react",
5
5
  "keywords": [
6
6
  "react",