@dolphinweex/weex-vue-render 0.2.85 → 0.2.86

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.
@@ -11084,49 +11084,21 @@ function transitionOnce (vnode, config, callback) {
11084
11084
  callback && callback();
11085
11085
  }, totalMs);
11086
11086
  nextFrame(function () {
11087
- // 修改 transform:translate让它支持传3개参数,且第三个参数无效
11087
+ // 修改 transform:translate让它支持传3个参数,且第三个参数无效
11088
11088
  if (config.styles["transform"]) {
11089
11089
  config.styles["transform"] = config.styles["transform"].replace(/(translate\([^,]+,[^,]+),[^)]+\)/, '$1)')
11090
11090
  }
11091
11091
  var toCss = toCSSText(styleObject2rem(config.styles, DESIGN_ROOT_VALUE) || {})
11092
- // 劫持该 DOM 的样式更新行为
11093
- if (dom && !dom._hijacked) {
11094
- dom._hijacked = true;
11095
- var observer = new MutationObserver(function(mutations) {
11096
- try {
11097
- mutations.forEach(function(mutation) {
11098
- if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
11099
- var currentCss = dom.style.cssText;
11100
- var needAppend = "";
11101
- for (var key in dom._ani_lock) {
11102
- var val = dom._ani_lock[key];
11103
- // 使用正则匹配,确保值和单位完全一致(包括括号转义)
11104
- var escapedVal = val.toString().replace(/([()])/g, "\\$1");
11105
- var valueRegex = new RegExp("(^|;)\\s*" + key + "\\s*:\\s*" + escapedVal + "\\s*(;|$)", "i");
11106
-
11107
- if (!valueRegex.test(currentCss)) {
11108
- needAppend += key + ":" + val + ";";
11109
- }
11110
- }
11111
-
11112
- if (needAppend) {
11113
- observer.disconnect();
11114
- dom.style.cssText += needAppend;
11115
- observer.observe(dom, { attributes: true, attributeFilter: ['style'] });
11116
- }
11117
- }
11118
- });
11119
- } catch (err) {
11120
- console.error('[weex-vue-render] MutationObserver Protect Error:', err);
11121
- }
11122
- });
11123
- observer.observe(dom, { attributes: true, attributeFilter: ['style'] });
11124
- }
11092
+
11093
+ // 给dom上标记是动画修改的style
11094
+ if(!dom.animation_style) { dom.animation_style = "" }
11095
+ dom.animation_style += toCss
11125
11096
 
11126
11097
  dom.style.cssText += toCss;
11127
11098
  });
11128
11099
  }
11129
11100
 
11101
+
11130
11102
  var animation = {
11131
11103
  /**
11132
11104
  * transition
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.85"
52
+ "version": "0.2.86"
53
53
  }