vue 2.6.7 → 2.6.11
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/README.md +72 -52
- package/dist/README.md +1 -1
- package/dist/vue.common.dev.js +109 -51
- package/dist/vue.common.prod.js +2 -2
- package/dist/vue.esm.browser.js +109 -51
- package/dist/vue.esm.browser.min.js +2 -2
- package/dist/vue.esm.js +109 -51
- package/dist/vue.js +109 -51
- package/dist/vue.min.js +2 -2
- package/dist/vue.runtime.common.dev.js +80 -38
- package/dist/vue.runtime.common.prod.js +2 -2
- package/dist/vue.runtime.esm.js +80 -38
- package/dist/vue.runtime.js +80 -38
- package/dist/vue.runtime.min.js +2 -2
- package/package.json +4 -4
- package/src/compiler/codegen/events.js +1 -1
- package/src/compiler/codegen/index.js +1 -1
- package/src/compiler/error-detector.js +18 -3
- package/src/compiler/parser/html-parser.js +5 -5
- package/src/compiler/parser/index.js +7 -6
- package/src/core/instance/proxy.js +1 -1
- package/src/core/instance/render-helpers/bind-dynamic-keys.js +1 -1
- package/src/core/instance/render-helpers/bind-object-props.js +5 -3
- package/src/core/instance/render.js +1 -1
- package/src/core/observer/scheduler.js +17 -6
- package/src/core/util/env.js +1 -2
- package/src/core/util/error.js +4 -3
- package/src/core/util/lang.js +2 -2
- package/src/core/util/next-tick.js +1 -1
- package/src/core/util/options.js +2 -2
- package/src/core/vdom/create-element.js +6 -0
- package/src/core/vdom/helpers/normalize-scoped-slots.js +9 -4
- package/src/core/vdom/helpers/resolve-async-component.js +25 -8
- package/src/core/vdom/patch.js +4 -4
- package/src/platforms/web/compiler/modules/model.js +1 -1
- package/src/platforms/web/runtime/modules/dom-props.js +2 -1
- package/src/platforms/web/runtime/modules/events.js +4 -2
- package/src/platforms/web/runtime/modules/transition.js +1 -1
- package/src/server/template-renderer/create-async-file-mapper.js +2 -2
- package/src/server/write.js +1 -1
- package/types/index.d.ts +1 -2
- package/types/options.d.ts +3 -3
- package/types/umd.d.ts +48 -0
- package/types/vnode.d.ts +6 -2
- package/types/vue.d.ts +3 -3
package/dist/vue.runtime.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.6.
|
|
2
|
+
* Vue.js v2.6.11
|
|
3
3
|
* (c) 2014-2019 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -466,7 +466,7 @@ var config = ({
|
|
|
466
466
|
* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
|
|
467
467
|
* skipping \u10000-\uEFFFF due to it freezing up PhantomJS
|
|
468
468
|
*/
|
|
469
|
-
var
|
|
469
|
+
var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
|
|
470
470
|
|
|
471
471
|
/**
|
|
472
472
|
* Check if a string starts with $ or _
|
|
@@ -491,7 +491,7 @@ function def (obj, key, val, enumerable) {
|
|
|
491
491
|
/**
|
|
492
492
|
* Parse simple path.
|
|
493
493
|
*/
|
|
494
|
-
var bailRE = new RegExp(("[^" +
|
|
494
|
+
var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
|
|
495
495
|
function parsePath (path) {
|
|
496
496
|
if (bailRE.test(path)) {
|
|
497
497
|
return
|
|
@@ -1397,7 +1397,7 @@ function checkComponents (options) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
|
|
1399
1399
|
function validateComponentName (name) {
|
|
1400
|
-
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" +
|
|
1400
|
+
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
|
|
1401
1401
|
warn(
|
|
1402
1402
|
'Invalid component name: "' + name + '". Component names ' +
|
|
1403
1403
|
'should conform to valid custom element name in html5 specification.'
|
|
@@ -1852,10 +1852,11 @@ function invokeWithErrorHandling (
|
|
|
1852
1852
|
var res;
|
|
1853
1853
|
try {
|
|
1854
1854
|
res = args ? handler.apply(context, args) : handler.call(context);
|
|
1855
|
-
if (res && !res._isVue && isPromise(res)) {
|
|
1855
|
+
if (res && !res._isVue && isPromise(res) && !res._handled) {
|
|
1856
|
+
res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
|
|
1856
1857
|
// issue #9511
|
|
1857
|
-
//
|
|
1858
|
-
res =
|
|
1858
|
+
// avoid catch triggering multiple times when nested calls
|
|
1859
|
+
res._handled = true;
|
|
1859
1860
|
}
|
|
1860
1861
|
} catch (e) {
|
|
1861
1862
|
handleError(e, vm, info);
|
|
@@ -1959,7 +1960,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
|
|
|
1959
1960
|
isUsingMicroTask = true;
|
|
1960
1961
|
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
|
|
1961
1962
|
// Fallback to setImmediate.
|
|
1962
|
-
//
|
|
1963
|
+
// Technically it leverages the (macro) task queue,
|
|
1963
1964
|
// but it is still a better choice than setTimeout.
|
|
1964
1965
|
timerFunc = function () {
|
|
1965
1966
|
setImmediate(flushCallbacks);
|
|
@@ -2025,7 +2026,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2025
2026
|
warn(
|
|
2026
2027
|
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
|
|
2027
2028
|
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
|
|
2028
|
-
'prevent conflicts with Vue internals' +
|
|
2029
|
+
'prevent conflicts with Vue internals. ' +
|
|
2029
2030
|
'See: https://vuejs.org/v2/api/#data',
|
|
2030
2031
|
target
|
|
2031
2032
|
);
|
|
@@ -2540,7 +2541,8 @@ function normalizeScopedSlots (
|
|
|
2540
2541
|
prevSlots
|
|
2541
2542
|
) {
|
|
2542
2543
|
var res;
|
|
2543
|
-
var
|
|
2544
|
+
var hasNormalSlots = Object.keys(normalSlots).length > 0;
|
|
2545
|
+
var isStable = slots ? !!slots.$stable : !hasNormalSlots;
|
|
2544
2546
|
var key = slots && slots.$key;
|
|
2545
2547
|
if (!slots) {
|
|
2546
2548
|
res = {};
|
|
@@ -2552,7 +2554,8 @@ function normalizeScopedSlots (
|
|
|
2552
2554
|
prevSlots &&
|
|
2553
2555
|
prevSlots !== emptyObject &&
|
|
2554
2556
|
key === prevSlots.$key &&
|
|
2555
|
-
|
|
2557
|
+
!hasNormalSlots &&
|
|
2558
|
+
!prevSlots.$hasNormal
|
|
2556
2559
|
) {
|
|
2557
2560
|
// fast path 2: stable scoped slots w/ no normal slots to proxy,
|
|
2558
2561
|
// only need to normalize once
|
|
@@ -2578,6 +2581,7 @@ function normalizeScopedSlots (
|
|
|
2578
2581
|
}
|
|
2579
2582
|
def(res, '$stable', isStable);
|
|
2580
2583
|
def(res, '$key', key);
|
|
2584
|
+
def(res, '$hasNormal', hasNormalSlots);
|
|
2581
2585
|
return res
|
|
2582
2586
|
}
|
|
2583
2587
|
|
|
@@ -2587,8 +2591,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
|
|
|
2587
2591
|
res = res && typeof res === 'object' && !Array.isArray(res)
|
|
2588
2592
|
? [res] // single vnode
|
|
2589
2593
|
: normalizeChildren(res);
|
|
2590
|
-
return res &&
|
|
2591
|
-
|
|
2594
|
+
return res && (
|
|
2595
|
+
res.length === 0 ||
|
|
2596
|
+
(res.length === 1 && res[0].isComment) // #9658
|
|
2597
|
+
) ? undefined
|
|
2592
2598
|
: res
|
|
2593
2599
|
};
|
|
2594
2600
|
// this is a slot using the new v-slot syntax without scope. although it is
|
|
@@ -2768,12 +2774,13 @@ function bindObjectProps (
|
|
|
2768
2774
|
: data.attrs || (data.attrs = {});
|
|
2769
2775
|
}
|
|
2770
2776
|
var camelizedKey = camelize(key);
|
|
2771
|
-
|
|
2777
|
+
var hyphenatedKey = hyphenate(key);
|
|
2778
|
+
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
|
|
2772
2779
|
hash[key] = value[key];
|
|
2773
2780
|
|
|
2774
2781
|
if (isSync) {
|
|
2775
2782
|
var on = data.on || (data.on = {});
|
|
2776
|
-
on[("update:" +
|
|
2783
|
+
on[("update:" + key)] = function ($event) {
|
|
2777
2784
|
value[key] = $event;
|
|
2778
2785
|
};
|
|
2779
2786
|
}
|
|
@@ -2904,7 +2911,7 @@ function bindDynamicKeys (baseObj, values) {
|
|
|
2904
2911
|
if (typeof key === 'string' && key) {
|
|
2905
2912
|
baseObj[values[i]] = values[i + 1];
|
|
2906
2913
|
} else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {
|
|
2907
|
-
// null is a
|
|
2914
|
+
// null is a special value for explicitly removing a binding
|
|
2908
2915
|
warn(
|
|
2909
2916
|
("Invalid value for dynamic directive argument (expected string or null): " + key),
|
|
2910
2917
|
this
|
|
@@ -3400,6 +3407,12 @@ function _createElement (
|
|
|
3400
3407
|
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
|
|
3401
3408
|
if (config.isReservedTag(tag)) {
|
|
3402
3409
|
// platform built-in elements
|
|
3410
|
+
if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn)) {
|
|
3411
|
+
warn(
|
|
3412
|
+
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
|
|
3413
|
+
context
|
|
3414
|
+
);
|
|
3415
|
+
}
|
|
3403
3416
|
vnode = new VNode(
|
|
3404
3417
|
config.parsePlatformTagName(tag), data, children,
|
|
3405
3418
|
undefined, undefined, context
|
|
@@ -3528,7 +3541,7 @@ function renderMixin (Vue) {
|
|
|
3528
3541
|
// render self
|
|
3529
3542
|
var vnode;
|
|
3530
3543
|
try {
|
|
3531
|
-
// There's no need to maintain a stack
|
|
3544
|
+
// There's no need to maintain a stack because all render fns are called
|
|
3532
3545
|
// separately from one another. Nested component's render fns are called
|
|
3533
3546
|
// when parent component is patched.
|
|
3534
3547
|
currentRenderingInstance = vm;
|
|
@@ -3611,17 +3624,23 @@ function resolveAsyncComponent (
|
|
|
3611
3624
|
return factory.resolved
|
|
3612
3625
|
}
|
|
3613
3626
|
|
|
3627
|
+
var owner = currentRenderingInstance;
|
|
3628
|
+
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
|
|
3629
|
+
// already pending
|
|
3630
|
+
factory.owners.push(owner);
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3614
3633
|
if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
|
|
3615
3634
|
return factory.loadingComp
|
|
3616
3635
|
}
|
|
3617
3636
|
|
|
3618
|
-
|
|
3619
|
-
if (isDef(factory.owners)) {
|
|
3620
|
-
// already pending
|
|
3621
|
-
factory.owners.push(owner);
|
|
3622
|
-
} else {
|
|
3637
|
+
if (owner && !isDef(factory.owners)) {
|
|
3623
3638
|
var owners = factory.owners = [owner];
|
|
3624
3639
|
var sync = true;
|
|
3640
|
+
var timerLoading = null;
|
|
3641
|
+
var timerTimeout = null
|
|
3642
|
+
|
|
3643
|
+
;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
|
|
3625
3644
|
|
|
3626
3645
|
var forceRender = function (renderCompleted) {
|
|
3627
3646
|
for (var i = 0, l = owners.length; i < l; i++) {
|
|
@@ -3630,6 +3649,14 @@ function resolveAsyncComponent (
|
|
|
3630
3649
|
|
|
3631
3650
|
if (renderCompleted) {
|
|
3632
3651
|
owners.length = 0;
|
|
3652
|
+
if (timerLoading !== null) {
|
|
3653
|
+
clearTimeout(timerLoading);
|
|
3654
|
+
timerLoading = null;
|
|
3655
|
+
}
|
|
3656
|
+
if (timerTimeout !== null) {
|
|
3657
|
+
clearTimeout(timerTimeout);
|
|
3658
|
+
timerTimeout = null;
|
|
3659
|
+
}
|
|
3633
3660
|
}
|
|
3634
3661
|
};
|
|
3635
3662
|
|
|
@@ -3676,7 +3703,8 @@ function resolveAsyncComponent (
|
|
|
3676
3703
|
if (res.delay === 0) {
|
|
3677
3704
|
factory.loading = true;
|
|
3678
3705
|
} else {
|
|
3679
|
-
setTimeout(function () {
|
|
3706
|
+
timerLoading = setTimeout(function () {
|
|
3707
|
+
timerLoading = null;
|
|
3680
3708
|
if (isUndef(factory.resolved) && isUndef(factory.error)) {
|
|
3681
3709
|
factory.loading = true;
|
|
3682
3710
|
forceRender(false);
|
|
@@ -3686,7 +3714,8 @@ function resolveAsyncComponent (
|
|
|
3686
3714
|
}
|
|
3687
3715
|
|
|
3688
3716
|
if (isDef(res.timeout)) {
|
|
3689
|
-
setTimeout(function () {
|
|
3717
|
+
timerTimeout = setTimeout(function () {
|
|
3718
|
+
timerTimeout = null;
|
|
3690
3719
|
if (isUndef(factory.resolved)) {
|
|
3691
3720
|
reject(
|
|
3692
3721
|
process.env.NODE_ENV !== 'production'
|
|
@@ -4234,11 +4263,21 @@ var getNow = Date.now;
|
|
|
4234
4263
|
// timestamp can either be hi-res (relative to page load) or low-res
|
|
4235
4264
|
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
4236
4265
|
// same timestamp type when saving the flush timestamp.
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4266
|
+
// All IE versions use low-res event timestamps, and have problematic clock
|
|
4267
|
+
// implementations (#9632)
|
|
4268
|
+
if (inBrowser && !isIE) {
|
|
4269
|
+
var performance = window.performance;
|
|
4270
|
+
if (
|
|
4271
|
+
performance &&
|
|
4272
|
+
typeof performance.now === 'function' &&
|
|
4273
|
+
getNow() > document.createEvent('Event').timeStamp
|
|
4274
|
+
) {
|
|
4275
|
+
// if the event timestamp, although evaluated AFTER the Date.now(), is
|
|
4276
|
+
// smaller than it, it means the event is using a hi-res timestamp,
|
|
4277
|
+
// and we need to use the hi-res version for event listener timestamps as
|
|
4278
|
+
// well.
|
|
4279
|
+
getNow = function () { return performance.now(); };
|
|
4280
|
+
}
|
|
4242
4281
|
}
|
|
4243
4282
|
|
|
4244
4283
|
/**
|
|
@@ -5411,7 +5450,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
5411
5450
|
value: FunctionalRenderContext
|
|
5412
5451
|
});
|
|
5413
5452
|
|
|
5414
|
-
Vue.version = '2.6.
|
|
5453
|
+
Vue.version = '2.6.11';
|
|
5415
5454
|
|
|
5416
5455
|
/* */
|
|
5417
5456
|
|
|
@@ -6082,7 +6121,7 @@ function createPatchFunction (backend) {
|
|
|
6082
6121
|
}
|
|
6083
6122
|
}
|
|
6084
6123
|
|
|
6085
|
-
function removeVnodes (
|
|
6124
|
+
function removeVnodes (vnodes, startIdx, endIdx) {
|
|
6086
6125
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
6087
6126
|
var ch = vnodes[startIdx];
|
|
6088
6127
|
if (isDef(ch)) {
|
|
@@ -6193,7 +6232,7 @@ function createPatchFunction (backend) {
|
|
|
6193
6232
|
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
|
6194
6233
|
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
|
6195
6234
|
} else if (newStartIdx > newEndIdx) {
|
|
6196
|
-
removeVnodes(
|
|
6235
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
6197
6236
|
}
|
|
6198
6237
|
}
|
|
6199
6238
|
|
|
@@ -6285,7 +6324,7 @@ function createPatchFunction (backend) {
|
|
|
6285
6324
|
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
|
6286
6325
|
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
|
6287
6326
|
} else if (isDef(oldCh)) {
|
|
6288
|
-
removeVnodes(
|
|
6327
|
+
removeVnodes(oldCh, 0, oldCh.length - 1);
|
|
6289
6328
|
} else if (isDef(oldVnode.text)) {
|
|
6290
6329
|
nodeOps.setTextContent(elm, '');
|
|
6291
6330
|
}
|
|
@@ -6516,7 +6555,7 @@ function createPatchFunction (backend) {
|
|
|
6516
6555
|
|
|
6517
6556
|
// destroy old node
|
|
6518
6557
|
if (isDef(parentElm)) {
|
|
6519
|
-
removeVnodes(
|
|
6558
|
+
removeVnodes([oldVnode], 0, 0);
|
|
6520
6559
|
} else if (isDef(oldVnode.tag)) {
|
|
6521
6560
|
invokeDestroyHook(oldVnode);
|
|
6522
6561
|
}
|
|
@@ -6866,8 +6905,10 @@ function add$1 (
|
|
|
6866
6905
|
e.target === e.currentTarget ||
|
|
6867
6906
|
// event is fired after handler attachment
|
|
6868
6907
|
e.timeStamp >= attachedTimestamp ||
|
|
6869
|
-
//
|
|
6870
|
-
|
|
6908
|
+
// bail for environments that have buggy event.timeStamp implementations
|
|
6909
|
+
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
|
|
6910
|
+
// #9681 QtWebEngine event.timeStamp is negative value
|
|
6911
|
+
e.timeStamp <= 0 ||
|
|
6871
6912
|
// #9448 bail if event is fired in another document in a multi-page
|
|
6872
6913
|
// electron/nw.js app, since event.timeStamp will be using a different
|
|
6873
6914
|
// starting reference
|
|
@@ -6934,10 +6975,11 @@ function updateDOMProps (oldVnode, vnode) {
|
|
|
6934
6975
|
}
|
|
6935
6976
|
|
|
6936
6977
|
for (key in oldProps) {
|
|
6937
|
-
if (
|
|
6978
|
+
if (!(key in props)) {
|
|
6938
6979
|
elm[key] = '';
|
|
6939
6980
|
}
|
|
6940
6981
|
}
|
|
6982
|
+
|
|
6941
6983
|
for (key in props) {
|
|
6942
6984
|
cur = props[key];
|
|
6943
6985
|
// ignore children if the node has textContent or innerHTML,
|
|
@@ -7485,8 +7527,8 @@ function enter (vnode, toggleDisplay) {
|
|
|
7485
7527
|
var context = activeInstance;
|
|
7486
7528
|
var transitionNode = activeInstance.$vnode;
|
|
7487
7529
|
while (transitionNode && transitionNode.parent) {
|
|
7488
|
-
transitionNode = transitionNode.parent;
|
|
7489
7530
|
context = transitionNode.context;
|
|
7531
|
+
transitionNode = transitionNode.parent;
|
|
7490
7532
|
}
|
|
7491
7533
|
|
|
7492
7534
|
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
package/dist/vue.runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.6.
|
|
2
|
+
* Vue.js v2.6.11
|
|
3
3
|
* (c) 2014-2019 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
|
|
473
473
|
* skipping \u10000-\uEFFFF due to it freezing up PhantomJS
|
|
474
474
|
*/
|
|
475
|
-
var
|
|
475
|
+
var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
|
|
476
476
|
|
|
477
477
|
/**
|
|
478
478
|
* Check if a string starts with $ or _
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
/**
|
|
498
498
|
* Parse simple path.
|
|
499
499
|
*/
|
|
500
|
-
var bailRE = new RegExp(("[^" +
|
|
500
|
+
var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
|
|
501
501
|
function parsePath (path) {
|
|
502
502
|
if (bailRE.test(path)) {
|
|
503
503
|
return
|
|
@@ -1401,7 +1401,7 @@
|
|
|
1401
1401
|
}
|
|
1402
1402
|
|
|
1403
1403
|
function validateComponentName (name) {
|
|
1404
|
-
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" +
|
|
1404
|
+
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
|
|
1405
1405
|
warn(
|
|
1406
1406
|
'Invalid component name: "' + name + '". Component names ' +
|
|
1407
1407
|
'should conform to valid custom element name in html5 specification.'
|
|
@@ -1852,10 +1852,11 @@
|
|
|
1852
1852
|
var res;
|
|
1853
1853
|
try {
|
|
1854
1854
|
res = args ? handler.apply(context, args) : handler.call(context);
|
|
1855
|
-
if (res && !res._isVue && isPromise(res)) {
|
|
1855
|
+
if (res && !res._isVue && isPromise(res) && !res._handled) {
|
|
1856
|
+
res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
|
|
1856
1857
|
// issue #9511
|
|
1857
|
-
//
|
|
1858
|
-
res =
|
|
1858
|
+
// avoid catch triggering multiple times when nested calls
|
|
1859
|
+
res._handled = true;
|
|
1859
1860
|
}
|
|
1860
1861
|
} catch (e) {
|
|
1861
1862
|
handleError(e, vm, info);
|
|
@@ -1959,7 +1960,7 @@
|
|
|
1959
1960
|
isUsingMicroTask = true;
|
|
1960
1961
|
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
|
|
1961
1962
|
// Fallback to setImmediate.
|
|
1962
|
-
//
|
|
1963
|
+
// Technically it leverages the (macro) task queue,
|
|
1963
1964
|
// but it is still a better choice than setTimeout.
|
|
1964
1965
|
timerFunc = function () {
|
|
1965
1966
|
setImmediate(flushCallbacks);
|
|
@@ -2025,7 +2026,7 @@
|
|
|
2025
2026
|
warn(
|
|
2026
2027
|
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
|
|
2027
2028
|
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
|
|
2028
|
-
'prevent conflicts with Vue internals' +
|
|
2029
|
+
'prevent conflicts with Vue internals. ' +
|
|
2029
2030
|
'See: https://vuejs.org/v2/api/#data',
|
|
2030
2031
|
target
|
|
2031
2032
|
);
|
|
@@ -2538,7 +2539,8 @@
|
|
|
2538
2539
|
prevSlots
|
|
2539
2540
|
) {
|
|
2540
2541
|
var res;
|
|
2541
|
-
var
|
|
2542
|
+
var hasNormalSlots = Object.keys(normalSlots).length > 0;
|
|
2543
|
+
var isStable = slots ? !!slots.$stable : !hasNormalSlots;
|
|
2542
2544
|
var key = slots && slots.$key;
|
|
2543
2545
|
if (!slots) {
|
|
2544
2546
|
res = {};
|
|
@@ -2550,7 +2552,8 @@
|
|
|
2550
2552
|
prevSlots &&
|
|
2551
2553
|
prevSlots !== emptyObject &&
|
|
2552
2554
|
key === prevSlots.$key &&
|
|
2553
|
-
|
|
2555
|
+
!hasNormalSlots &&
|
|
2556
|
+
!prevSlots.$hasNormal
|
|
2554
2557
|
) {
|
|
2555
2558
|
// fast path 2: stable scoped slots w/ no normal slots to proxy,
|
|
2556
2559
|
// only need to normalize once
|
|
@@ -2576,6 +2579,7 @@
|
|
|
2576
2579
|
}
|
|
2577
2580
|
def(res, '$stable', isStable);
|
|
2578
2581
|
def(res, '$key', key);
|
|
2582
|
+
def(res, '$hasNormal', hasNormalSlots);
|
|
2579
2583
|
return res
|
|
2580
2584
|
}
|
|
2581
2585
|
|
|
@@ -2585,8 +2589,10 @@
|
|
|
2585
2589
|
res = res && typeof res === 'object' && !Array.isArray(res)
|
|
2586
2590
|
? [res] // single vnode
|
|
2587
2591
|
: normalizeChildren(res);
|
|
2588
|
-
return res &&
|
|
2589
|
-
|
|
2592
|
+
return res && (
|
|
2593
|
+
res.length === 0 ||
|
|
2594
|
+
(res.length === 1 && res[0].isComment) // #9658
|
|
2595
|
+
) ? undefined
|
|
2590
2596
|
: res
|
|
2591
2597
|
};
|
|
2592
2598
|
// this is a slot using the new v-slot syntax without scope. although it is
|
|
@@ -2766,12 +2772,13 @@
|
|
|
2766
2772
|
: data.attrs || (data.attrs = {});
|
|
2767
2773
|
}
|
|
2768
2774
|
var camelizedKey = camelize(key);
|
|
2769
|
-
|
|
2775
|
+
var hyphenatedKey = hyphenate(key);
|
|
2776
|
+
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
|
|
2770
2777
|
hash[key] = value[key];
|
|
2771
2778
|
|
|
2772
2779
|
if (isSync) {
|
|
2773
2780
|
var on = data.on || (data.on = {});
|
|
2774
|
-
on[("update:" +
|
|
2781
|
+
on[("update:" + key)] = function ($event) {
|
|
2775
2782
|
value[key] = $event;
|
|
2776
2783
|
};
|
|
2777
2784
|
}
|
|
@@ -2902,7 +2909,7 @@
|
|
|
2902
2909
|
if (typeof key === 'string' && key) {
|
|
2903
2910
|
baseObj[values[i]] = values[i + 1];
|
|
2904
2911
|
} else if (key !== '' && key !== null) {
|
|
2905
|
-
// null is a
|
|
2912
|
+
// null is a special value for explicitly removing a binding
|
|
2906
2913
|
warn(
|
|
2907
2914
|
("Invalid value for dynamic directive argument (expected string or null): " + key),
|
|
2908
2915
|
this
|
|
@@ -3397,6 +3404,12 @@
|
|
|
3397
3404
|
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
|
|
3398
3405
|
if (config.isReservedTag(tag)) {
|
|
3399
3406
|
// platform built-in elements
|
|
3407
|
+
if (isDef(data) && isDef(data.nativeOn)) {
|
|
3408
|
+
warn(
|
|
3409
|
+
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
|
|
3410
|
+
context
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3400
3413
|
vnode = new VNode(
|
|
3401
3414
|
config.parsePlatformTagName(tag), data, children,
|
|
3402
3415
|
undefined, undefined, context
|
|
@@ -3522,7 +3535,7 @@
|
|
|
3522
3535
|
// render self
|
|
3523
3536
|
var vnode;
|
|
3524
3537
|
try {
|
|
3525
|
-
// There's no need to maintain a stack
|
|
3538
|
+
// There's no need to maintain a stack because all render fns are called
|
|
3526
3539
|
// separately from one another. Nested component's render fns are called
|
|
3527
3540
|
// when parent component is patched.
|
|
3528
3541
|
currentRenderingInstance = vm;
|
|
@@ -3605,17 +3618,23 @@
|
|
|
3605
3618
|
return factory.resolved
|
|
3606
3619
|
}
|
|
3607
3620
|
|
|
3621
|
+
var owner = currentRenderingInstance;
|
|
3622
|
+
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
|
|
3623
|
+
// already pending
|
|
3624
|
+
factory.owners.push(owner);
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3608
3627
|
if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
|
|
3609
3628
|
return factory.loadingComp
|
|
3610
3629
|
}
|
|
3611
3630
|
|
|
3612
|
-
|
|
3613
|
-
if (isDef(factory.owners)) {
|
|
3614
|
-
// already pending
|
|
3615
|
-
factory.owners.push(owner);
|
|
3616
|
-
} else {
|
|
3631
|
+
if (owner && !isDef(factory.owners)) {
|
|
3617
3632
|
var owners = factory.owners = [owner];
|
|
3618
3633
|
var sync = true;
|
|
3634
|
+
var timerLoading = null;
|
|
3635
|
+
var timerTimeout = null
|
|
3636
|
+
|
|
3637
|
+
;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
|
|
3619
3638
|
|
|
3620
3639
|
var forceRender = function (renderCompleted) {
|
|
3621
3640
|
for (var i = 0, l = owners.length; i < l; i++) {
|
|
@@ -3624,6 +3643,14 @@
|
|
|
3624
3643
|
|
|
3625
3644
|
if (renderCompleted) {
|
|
3626
3645
|
owners.length = 0;
|
|
3646
|
+
if (timerLoading !== null) {
|
|
3647
|
+
clearTimeout(timerLoading);
|
|
3648
|
+
timerLoading = null;
|
|
3649
|
+
}
|
|
3650
|
+
if (timerTimeout !== null) {
|
|
3651
|
+
clearTimeout(timerTimeout);
|
|
3652
|
+
timerTimeout = null;
|
|
3653
|
+
}
|
|
3627
3654
|
}
|
|
3628
3655
|
};
|
|
3629
3656
|
|
|
@@ -3670,7 +3697,8 @@
|
|
|
3670
3697
|
if (res.delay === 0) {
|
|
3671
3698
|
factory.loading = true;
|
|
3672
3699
|
} else {
|
|
3673
|
-
setTimeout(function () {
|
|
3700
|
+
timerLoading = setTimeout(function () {
|
|
3701
|
+
timerLoading = null;
|
|
3674
3702
|
if (isUndef(factory.resolved) && isUndef(factory.error)) {
|
|
3675
3703
|
factory.loading = true;
|
|
3676
3704
|
forceRender(false);
|
|
@@ -3680,7 +3708,8 @@
|
|
|
3680
3708
|
}
|
|
3681
3709
|
|
|
3682
3710
|
if (isDef(res.timeout)) {
|
|
3683
|
-
setTimeout(function () {
|
|
3711
|
+
timerTimeout = setTimeout(function () {
|
|
3712
|
+
timerTimeout = null;
|
|
3684
3713
|
if (isUndef(factory.resolved)) {
|
|
3685
3714
|
reject(
|
|
3686
3715
|
"timeout (" + (res.timeout) + "ms)"
|
|
@@ -4226,11 +4255,21 @@
|
|
|
4226
4255
|
// timestamp can either be hi-res (relative to page load) or low-res
|
|
4227
4256
|
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
4228
4257
|
// same timestamp type when saving the flush timestamp.
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4258
|
+
// All IE versions use low-res event timestamps, and have problematic clock
|
|
4259
|
+
// implementations (#9632)
|
|
4260
|
+
if (inBrowser && !isIE) {
|
|
4261
|
+
var performance = window.performance;
|
|
4262
|
+
if (
|
|
4263
|
+
performance &&
|
|
4264
|
+
typeof performance.now === 'function' &&
|
|
4265
|
+
getNow() > document.createEvent('Event').timeStamp
|
|
4266
|
+
) {
|
|
4267
|
+
// if the event timestamp, although evaluated AFTER the Date.now(), is
|
|
4268
|
+
// smaller than it, it means the event is using a hi-res timestamp,
|
|
4269
|
+
// and we need to use the hi-res version for event listener timestamps as
|
|
4270
|
+
// well.
|
|
4271
|
+
getNow = function () { return performance.now(); };
|
|
4272
|
+
}
|
|
4234
4273
|
}
|
|
4235
4274
|
|
|
4236
4275
|
/**
|
|
@@ -5395,7 +5434,7 @@
|
|
|
5395
5434
|
value: FunctionalRenderContext
|
|
5396
5435
|
});
|
|
5397
5436
|
|
|
5398
|
-
Vue.version = '2.6.
|
|
5437
|
+
Vue.version = '2.6.11';
|
|
5399
5438
|
|
|
5400
5439
|
/* */
|
|
5401
5440
|
|
|
@@ -6066,7 +6105,7 @@
|
|
|
6066
6105
|
}
|
|
6067
6106
|
}
|
|
6068
6107
|
|
|
6069
|
-
function removeVnodes (
|
|
6108
|
+
function removeVnodes (vnodes, startIdx, endIdx) {
|
|
6070
6109
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
6071
6110
|
var ch = vnodes[startIdx];
|
|
6072
6111
|
if (isDef(ch)) {
|
|
@@ -6177,7 +6216,7 @@
|
|
|
6177
6216
|
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
|
6178
6217
|
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
|
6179
6218
|
} else if (newStartIdx > newEndIdx) {
|
|
6180
|
-
removeVnodes(
|
|
6219
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
6181
6220
|
}
|
|
6182
6221
|
}
|
|
6183
6222
|
|
|
@@ -6269,7 +6308,7 @@
|
|
|
6269
6308
|
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
|
6270
6309
|
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
|
6271
6310
|
} else if (isDef(oldCh)) {
|
|
6272
|
-
removeVnodes(
|
|
6311
|
+
removeVnodes(oldCh, 0, oldCh.length - 1);
|
|
6273
6312
|
} else if (isDef(oldVnode.text)) {
|
|
6274
6313
|
nodeOps.setTextContent(elm, '');
|
|
6275
6314
|
}
|
|
@@ -6498,7 +6537,7 @@
|
|
|
6498
6537
|
|
|
6499
6538
|
// destroy old node
|
|
6500
6539
|
if (isDef(parentElm)) {
|
|
6501
|
-
removeVnodes(
|
|
6540
|
+
removeVnodes([oldVnode], 0, 0);
|
|
6502
6541
|
} else if (isDef(oldVnode.tag)) {
|
|
6503
6542
|
invokeDestroyHook(oldVnode);
|
|
6504
6543
|
}
|
|
@@ -6848,8 +6887,10 @@
|
|
|
6848
6887
|
e.target === e.currentTarget ||
|
|
6849
6888
|
// event is fired after handler attachment
|
|
6850
6889
|
e.timeStamp >= attachedTimestamp ||
|
|
6851
|
-
//
|
|
6852
|
-
|
|
6890
|
+
// bail for environments that have buggy event.timeStamp implementations
|
|
6891
|
+
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
|
|
6892
|
+
// #9681 QtWebEngine event.timeStamp is negative value
|
|
6893
|
+
e.timeStamp <= 0 ||
|
|
6853
6894
|
// #9448 bail if event is fired in another document in a multi-page
|
|
6854
6895
|
// electron/nw.js app, since event.timeStamp will be using a different
|
|
6855
6896
|
// starting reference
|
|
@@ -6916,10 +6957,11 @@
|
|
|
6916
6957
|
}
|
|
6917
6958
|
|
|
6918
6959
|
for (key in oldProps) {
|
|
6919
|
-
if (
|
|
6960
|
+
if (!(key in props)) {
|
|
6920
6961
|
elm[key] = '';
|
|
6921
6962
|
}
|
|
6922
6963
|
}
|
|
6964
|
+
|
|
6923
6965
|
for (key in props) {
|
|
6924
6966
|
cur = props[key];
|
|
6925
6967
|
// ignore children if the node has textContent or innerHTML,
|
|
@@ -7467,8 +7509,8 @@
|
|
|
7467
7509
|
var context = activeInstance;
|
|
7468
7510
|
var transitionNode = activeInstance.$vnode;
|
|
7469
7511
|
while (transitionNode && transitionNode.parent) {
|
|
7470
|
-
transitionNode = transitionNode.parent;
|
|
7471
7512
|
context = transitionNode.context;
|
|
7513
|
+
transitionNode = transitionNode.parent;
|
|
7472
7514
|
}
|
|
7473
7515
|
|
|
7474
7516
|
var isAppear = !context._isMounted || !vnode.isRootInsert;
|