@dolphinweex/weex-vue-render 0.2.55 → 0.2.59

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.
@@ -4829,6 +4829,8 @@ var base$1 = {
4829
4829
  },
4830
4830
 
4831
4831
  updated: function updated () {
4832
+ checkWeexRootClass();
4833
+
4832
4834
  var el = this.$el;
4833
4835
  if (!el || el.nodeType !== 1) {
4834
4836
  return
@@ -4857,6 +4859,7 @@ var base$1 = {
4857
4859
  },
4858
4860
 
4859
4861
  mounted: function mounted () {
4862
+ checkWeexRootClass();
4860
4863
  var tagName = this.$options && this.$options._componentTag;
4861
4864
  var el = this.$el;
4862
4865
  if (!el || el.nodeType !== 1) {
@@ -4872,7 +4875,6 @@ var base$1 = {
4872
4875
  metaMt[tagName]++;
4873
4876
 
4874
4877
  watchAppearForScrollables(tagName, this);
4875
- checkWeexRootClass();
4876
4878
 
4877
4879
  // when this is the root element of Vue instance.
4878
4880
  if (this === this.$root) {
@@ -5744,20 +5746,27 @@ function getImage(weex) {
5744
5746
 
5745
5747
  return path + processedAppendStr;
5746
5748
  },
5749
+ checkTrim(url) {
5750
+ if (url.includes(' ')) {
5751
+ const parts = url.replace(/\s/g, match => encodeURIComponent(match));
5752
+ return parts
5753
+ }
5754
+ return url
5755
+ },
5747
5756
  },
5748
5757
 
5749
5758
  render: function render(createElement) {
5750
5759
  return createElement("figure", {
5751
5760
  attrs: {
5752
5761
  "weex-type": "img",
5753
- src: this.src,
5762
+ src: this.checkTrim(this.src),
5754
5763
  },
5755
5764
  on: {
5756
5765
  weex$tap: this.handleClick,
5757
5766
  },
5758
5767
  staticClass: "weex-image weex-el",
5759
5768
  staticStyle: {
5760
- backgroundImage: `url(${this.src})`,
5769
+ backgroundImage: `url(${this.checkTrim(this.src)})`,
5761
5770
  backgroundSize: this.resize || "stretch",
5762
5771
  backgroundRepeat: "no-repeat",
5763
5772
  },
@@ -6315,7 +6324,18 @@ var scrollable$1 = {
6315
6324
  // 如果是垂直滚动,并且手势是垂直方向,则阻止冒泡
6316
6325
  var isScrollHorizontal = this.$el.classList.value.indexOf("weex-scroller-horizontal") > -1 || this.$el.classList.value.indexOf("weex-recycle-horizontal") > -1
6317
6326
 
6318
-
6327
+ if (isScrollHorizontal) {
6328
+ if (!isV) {
6329
+ // 水平
6330
+ event.stopPropagation();
6331
+ return;
6332
+ }
6333
+ return;
6334
+ }else {
6335
+ if (!isV) {
6336
+ return;
6337
+ }
6338
+ }
6319
6339
  if (!this._refresh && !this._loading) {
6320
6340
  return
6321
6341
  }
@@ -6342,18 +6362,6 @@ var scrollable$1 = {
6342
6362
  }
6343
6363
  }
6344
6364
  }
6345
- if (isScrollHorizontal) {
6346
- if (!isV) {
6347
- // 水平
6348
- event.stopPropagation();
6349
- return;
6350
- }
6351
- return;
6352
- }else {
6353
- if (!isV) {
6354
- return;
6355
- }
6356
- }
6357
6365
  },
6358
6366
 
6359
6367
  handleTouchEnd: function handleTouchEnd (event) {
@@ -7268,7 +7276,8 @@ function getLoading () {
7268
7276
  },
7269
7277
  pullingEnd: function pullingEnd () {
7270
7278
  this.$el && (this.$el.style.transition = "height .2s");
7271
- if ( this.height >= Math.max(this.viewHeight, 150) && this.isElementFullyInViewport()) {
7279
+ const isView = this.viewHeight ? this.isElementFullyInViewport() : true
7280
+ if ( this.height >= this.viewHeight && isView) {
7272
7281
  this.pulling(this.viewHeight);
7273
7282
  if (this.$el) {
7274
7283
  dispatchNativeEvent(this.$el, 'loading');
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.55"
52
+ "version": "0.2.59"
53
53
  }