@dolphinweex/weex-vue-render 0.2.85 → 0.2.87
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.
- package/dist/index.common.js +6 -43
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -5221,15 +5221,6 @@ var inputCommon = {
|
|
|
5221
5221
|
globalEvent.addEventListener('receiveMessageFromApp', this._keyboardHeightChangeHandler);
|
|
5222
5222
|
},
|
|
5223
5223
|
|
|
5224
|
-
beforeDestroy: function beforeDestroy () {
|
|
5225
|
-
// 移除键盘高度变化监听
|
|
5226
|
-
if (this._keyboardHeightChangeHandler) {
|
|
5227
|
-
var globalEvent = weex.requireModule('globalEvent');
|
|
5228
|
-
globalEvent && globalEvent.removeEventListener &&
|
|
5229
|
-
globalEvent.removeEventListener('receiveMessageFromApp', this._keyboardHeightChangeHandler);
|
|
5230
|
-
}
|
|
5231
|
-
},
|
|
5232
|
-
|
|
5233
5224
|
methods: {
|
|
5234
5225
|
focus: function focus (autofocus) {
|
|
5235
5226
|
// 当是自动聚焦时才需要主动弹出键盘,否则会导致键盘弹出但是组件失去焦点
|
|
@@ -11084,49 +11075,21 @@ function transitionOnce (vnode, config, callback) {
|
|
|
11084
11075
|
callback && callback();
|
|
11085
11076
|
}, totalMs);
|
|
11086
11077
|
nextFrame(function () {
|
|
11087
|
-
// 修改 transform:translate让它支持传3
|
|
11078
|
+
// 修改 transform:translate让它支持传3个参数,且第三个参数无效
|
|
11088
11079
|
if (config.styles["transform"]) {
|
|
11089
11080
|
config.styles["transform"] = config.styles["transform"].replace(/(translate\([^,]+,[^,]+),[^)]+\)/, '$1)')
|
|
11090
11081
|
}
|
|
11091
11082
|
var toCss = toCSSText(styleObject2rem(config.styles, DESIGN_ROOT_VALUE) || {})
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
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
|
-
}
|
|
11083
|
+
|
|
11084
|
+
// 给dom上标记是动画修改的style
|
|
11085
|
+
if(!dom.animation_style) { dom.animation_style = "" }
|
|
11086
|
+
dom.animation_style += toCss
|
|
11125
11087
|
|
|
11126
11088
|
dom.style.cssText += toCss;
|
|
11127
11089
|
});
|
|
11128
11090
|
}
|
|
11129
11091
|
|
|
11092
|
+
|
|
11130
11093
|
var animation = {
|
|
11131
11094
|
/**
|
|
11132
11095
|
* transition
|
package/package.json
CHANGED