@dolphinweex/weex-vue-render 0.2.72 → 0.2.74

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.
@@ -5736,7 +5736,7 @@ function getImage(weex) {
5736
5736
  const params = {
5737
5737
  operation: "saveImageToPhotosAlbum",
5738
5738
  params: {
5739
- src: this.saveImg,
5739
+ src: this.src,
5740
5740
  },
5741
5741
  };
5742
5742
  weex.requireModule("bridgeModule").commandInterface(
@@ -11009,21 +11009,36 @@ function transitionOnce (vnode, config, callback) {
11009
11009
  var dom = vnode instanceof HTMLElement ? vnode : vnode.$el;
11010
11010
  // trigger image lazyloading by force.
11011
11011
  dom && weex.utils.fireLazyload(dom, true);
11012
-
11013
- var transitionEndHandler = function (event) {
11014
- event && event.stopPropagation();
11012
+
11013
+ var ended = false;
11014
+ var cleanup = function () {
11015
+ if (ended) { return }
11016
+ ended = true;
11015
11017
  if (endEvent) {
11016
11018
  dom.removeEventListener(endEvent, transitionEndHandler);
11019
+ }
11020
+ if (styleName) {
11017
11021
  dom.style[styleName] = '';
11018
11022
  }
11023
+ };
11024
+ var transitionEndHandler = function (event) {
11025
+ event && event.stopPropagation();
11026
+ clearTimeout(timerId);
11027
+ cleanup();
11019
11028
  setTimeout(()=>{
11020
- callback(); //解决嵌套animation的时候 duration过小时会出现瞬间执行完毕的问题
11029
+ callback && callback(); // 兼容嵌套动画
11021
11030
  })
11022
11031
  };
11023
11032
  if (endEvent) {
11024
11033
  dom.style[styleName] = transitionValue;
11025
- dom.addEventListener(endEvent, transitionEndHandler);
11034
+ dom.addEventListener(endEvent, transitionEndHandler);
11026
11035
  }
11036
+ var totalMs = (duration + delay) + 60; // 兜底计时器,避免不触发 transitionend 时卡死
11037
+ var timerId = setTimeout(function () {
11038
+ if (ended) { return }
11039
+ cleanup();
11040
+ callback && callback();
11041
+ }, totalMs);
11027
11042
  nextFrame(function () {
11028
11043
  // 修改 transform:translate让它支持传3个参数,且第三个参数无效
11029
11044
  if (config.styles["transform"]) {
@@ -12261,7 +12276,7 @@ return weex;
12261
12276
  // 一多适配不同宽高比例的屏幕,使用resetViewport也能适配宽度,
12262
12277
  // 但项目存在没有使用rem的元素,且页面高度重置方法也因项目而异。
12263
12278
  // 后续联合所有页面统一做了适配后可删除此段代码
12264
- const globalEventForReload = weex.requireModule('globalEvent')
12265
- globalEventForReload.addEventListener("WebReload",()=>{
12266
- location.reload()
12267
- })
12279
+ const globalEventForReload = weex.requireModule('globalEvent')
12280
+ globalEventForReload.addEventListener("WebReload",()=>{
12281
+ location.reload()
12282
+ })
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.72"
52
+ "version": "0.2.74"
53
53
  }