@dolphinweex/weex-vue-render 0.2.55 → 0.2.58

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
  },
@@ -7268,7 +7277,8 @@ function getLoading () {
7268
7277
  },
7269
7278
  pullingEnd: function pullingEnd () {
7270
7279
  this.$el && (this.$el.style.transition = "height .2s");
7271
- if ( this.height >= Math.max(this.viewHeight, 150) && this.isElementFullyInViewport()) {
7280
+ const isView = this.viewHeight ? this.isElementFullyInViewport() : true
7281
+ if ( this.height >= this.viewHeight && isView) {
7272
7282
  this.pulling(this.viewHeight);
7273
7283
  if (this.$el) {
7274
7284
  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.58"
53
53
  }