@dolphinweex/weex-vue-render 0.2.2 → 0.2.4

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.
@@ -3969,7 +3969,10 @@ function initEnv (viewportInfo, envInfo) {
3969
3969
  }
3970
3970
  var osVersion = envInfo.os.version.val;
3971
3971
 
3972
- var device_display = $midea_harmony_native.getHarmoryDeviceDisplay() || {};
3972
+ var device_display = {};
3973
+ try {
3974
+ device_display = $midea_harmony_native.getHarmoryDeviceDisplay()
3975
+ }catch(e) {}
3973
3976
 
3974
3977
 
3975
3978
  var env = {
@@ -3989,8 +3992,8 @@ function initEnv (viewportInfo, envInfo) {
3989
3992
  isFullScreen: device_display.isFullScreen,
3990
3993
  weexVersion: device_display.weexVersion,
3991
3994
  osName: device_display.osName,
3992
- statusBarHeight: device_display.statusBarHeight,
3993
- safeAreaBottomHeight: device_display.safeAreaBottomHeight,
3995
+ statusBarHeight: device_display.statusBarHeight * device_display.scale,
3996
+ safeAreaBottomHeight: device_display.safeAreaBottomHeight * device_display.scale,
3994
3997
  isImmersion: device_display.isImmersion,
3995
3998
 
3996
3999
  };
@@ -5665,6 +5668,8 @@ var DEFAULT_LOADMORE_OFFSET = 0;
5665
5668
 
5666
5669
  function getThrottledScroll (context) {
5667
5670
  var scale = weex.config.env.scale;
5671
+ var rate = 750 / document.documentElement.clientWidth // 750设计稿放缩倍率
5672
+
5668
5673
  if (!context._throttleScroll) {
5669
5674
  var wrapper = context.$refs.wrapper;
5670
5675
  var inner = context.$refs.inner;
@@ -5695,7 +5700,7 @@ function getThrottledScroll (context) {
5695
5700
  * v y
5696
5701
  *
5697
5702
  */
5698
- y: -wrapper.scrollTop
5703
+ y: -wrapper.scrollTop * rate
5699
5704
  }
5700
5705
  };
5701
5706
  if (context.$el) {
@@ -6095,7 +6100,12 @@ function getList (weex) {
6095
6100
  mounted: function mounted () {
6096
6101
  var this$1 = this;
6097
6102
  setTimeout(() => {
6098
- if (this$1.$el.clientHeight == 0) {
6103
+ var computedStyle = window.getComputedStyle(this$1.$el)
6104
+ var paddingTop = parseFloat(computedStyle.paddingTop)
6105
+ var paddingBottom = parseFloat(computedStyle.paddingBottom)
6106
+ var height = parseFloat(computedStyle.height)
6107
+
6108
+ if (height - paddingTop - paddingBottom <= 1) {
6099
6109
  this$1.$el.classList.remove("height-0");
6100
6110
  }
6101
6111
  }, 0);
@@ -6110,7 +6120,10 @@ function getList (weex) {
6110
6120
  return [
6111
6121
  h('article', {
6112
6122
  ref: 'inner',
6113
- staticClass: 'weex-list-inner weex-ct'
6123
+ staticClass: 'weex-list-inner weex-ct',
6124
+ staticStyle: {
6125
+ width: "100%"
6126
+ }
6114
6127
  }, this._cells)
6115
6128
  ]
6116
6129
  }
@@ -6188,7 +6201,12 @@ function getScroller (weex) {
6188
6201
  mounted: function mounted () {
6189
6202
  var this$1 = this;
6190
6203
  setTimeout(() => {
6191
- if (this$1.$el.clientHeight == 0) {
6204
+ var computedStyle = window.getComputedStyle(this$1.$el)
6205
+ var paddingTop = parseFloat(computedStyle.paddingTop)
6206
+ var paddingBottom = parseFloat(computedStyle.paddingBottom)
6207
+ var height = parseFloat(computedStyle.height)
6208
+
6209
+ if (height - paddingTop - paddingBottom <= 1) {
6192
6210
  this$1.$el.classList.remove("height-0");
6193
6211
  }
6194
6212
  }, 0);
@@ -7101,7 +7119,12 @@ function getList$1 (weex) {
7101
7119
  mounted: function mounted () {
7102
7120
  var this$1 = this;
7103
7121
  setTimeout(() => {
7104
- if (this$1.$el.clientHeight == 0) {
7122
+ var computedStyle = window.getComputedStyle(this$1.$el)
7123
+ var paddingTop = parseFloat(computedStyle.paddingTop)
7124
+ var paddingBottom = parseFloat(computedStyle.paddingBottom)
7125
+ var height = parseFloat(computedStyle.height)
7126
+
7127
+ if (height - paddingTop - paddingBottom <= 1) {
7105
7128
  this$1.$el.classList.remove("height-0");
7106
7129
  }
7107
7130
  }, 0);
@@ -7128,7 +7151,10 @@ function getList$1 (weex) {
7128
7151
  return [
7129
7152
  h('article', {
7130
7153
  ref: 'inner',
7131
- staticClass: 'weex-recycle-inner weex-ct'
7154
+ staticClass: 'weex-recycle-inner weex-ct',
7155
+ staticStyle: {
7156
+ width: this.scrollDirection == 'vertical' ? "100%" : undefined,
7157
+ }
7132
7158
  }, [
7133
7159
  _vm._l(_vm._items, function (item, index) {
7134
7160
  return [
@@ -7182,7 +7208,7 @@ var recycleList = {
7182
7208
  }
7183
7209
  };
7184
7210
 
7185
- __$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nbody > .weex-list,\nbody > .weex-recycle,\nbody > .weex-scroller,\nbody > .weex-waterfall {\n max-height: 100%;\n}\n\n.weex-list-wrapper,\n.weex-recycle-wrapper,\n.weex-scroller-wrapper,\n.weex-waterfall-wrapper {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-list-wrapper,\n.weex-waterfall-wrapper {\n overflow-y: scroll !important;\n overflow-x: hidden !important;\n}\n\n.weex-list-inner,\n.weex-recycle-inner,\n.weex-scroller-inner,\n.weex-waterfall-inner {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-waterfall-inner-columns {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n}\n\n.weex-scroller-wrapper.weex-scroller-vertical,\n.weex-recycle-wrapper.weex-recycle-vertical {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.weex-scroller-wrapper.weex-scroller-horizontal,\n.weex-recycle-wrapper.weex-recycle-horizontal {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.weex-scroller-wrapper.weex-scroller-disabled {\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.weex-scroller-horizontal .weex-scroller-inner,\n.weex-recycle-horizontal .weex-recycle-inner {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n height: 100%;\n}\n\n.weex-cell {\n width: 100%;\n}\n\n.weex-refresh,\n.weex-loading {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n",undefined);
7211
+ __$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nbody > .weex-list,\nbody > .weex-recycle,\nbody > .weex-scroller,\nbody > .weex-waterfall {\n max-height: 100%;\n}\n\n.weex-list-wrapper,\n.weex-recycle-wrapper,\n.weex-scroller-wrapper,\n.weex-waterfall-wrapper {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-list-wrapper,\n.weex-waterfall-wrapper, \n.weex-recycle-wrapper {\n overflow-y: scroll !important;\n overflow-x: hidden !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n}\n\n.weex-list-inner,\n.weex-recycle-inner,\n.weex-scroller-inner,\n.weex-waterfall-inner {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-waterfall-inner-columns {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n}\n\n.weex-scroller-wrapper.weex-scroller-vertical,\n.weex-recycle-wrapper.weex-recycle-vertical {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.weex-scroller-wrapper.weex-scroller-horizontal,\n.weex-recycle-wrapper.weex-recycle-horizontal {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.weex-scroller-wrapper.weex-scroller-disabled {\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.weex-scroller-horizontal .weex-scroller-inner,\n.weex-recycle-horizontal .weex-recycle-inner {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n height: 100%;\n}\n\n.weex-cell {\n width: 100%;\n}\n\n.weex-refresh,\n.weex-loading {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n",undefined);
7186
7212
 
7187
7213
  /*
7188
7214
  * Licensed to the Apache Software Foundation (ASF) under one
package/package.json CHANGED
@@ -49,5 +49,5 @@
49
49
  "type": "git",
50
50
  "url": "git+ssh://git@github.com/weexteam/weex-vue-render.git"
51
51
  },
52
- "version": "0.2.2"
52
+ "version": "0.2.4"
53
53
  }