提交 307bc86d 编写于 作者: fxy060608's avatar fxy060608

fix(nvue): ignore v-on directive (boolean attribute)

上级 bf9b3247
......@@ -1492,7 +1492,10 @@ function parse (
{
attrs.forEach(function (attr) {
if(
attr.name.indexOf('v-slot') !== 0 && // fixed by xxxxxx 忽略 v-slot
(
!onRE.test(attr.name) &&
attr.name.indexOf('v-slot') !== 0
) && // fixed by xxxxxx 忽略 v-slot
attr.value === '' &&
(attr.start + attr.name.length) === attr.end
){
......@@ -3414,39 +3417,6 @@ function assertObjectType (name, value, vm) {
/* */
var callbacks = [];
function flushCallbacks () {
var copies = callbacks.slice(0);
callbacks.length = 0;
for (var i = 0; i < copies.length; i++) {
copies[i]();
}
}
// The nextTick behavior leverages the microtask queue, which can be accessed
// via either native Promise.then or MutationObserver.
// MutationObserver has wider support, however it is seriously bugged in
// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
// completely stops working after triggering a few times... so, if native
// Promise is available, we will use it:
/* istanbul ignore next, $flow-disable-line */
if (typeof Promise !== 'undefined' && isNative(Promise)) ; else if (!isIE && typeof MutationObserver !== 'undefined' && (
isNative(MutationObserver) ||
// PhantomJS and iOS 7.x
MutationObserver.toString() === '[object MutationObserverConstructor]'
)) {
// Use MutationObserver where native Promise is not available,
// e.g. PhantomJS, iOS7, Android 4.4
// (#6466 MutationObserver is unreliable in IE11)
var counter = 1;
var observer = new MutationObserver(flushCallbacks);
var textNode = document.createTextNode(String(counter));
observer.observe(textNode, {
characterData: true
});
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) ;
/* */
/* */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册