vue 2.6.6 → 2.6.10
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 +24 -19
- package/dist/README.md +1 -1
- package/dist/vue.common.dev.js +169 -80
- package/dist/vue.common.prod.js +2 -2
- package/dist/vue.esm.browser.js +167 -76
- package/dist/vue.esm.browser.min.js +2 -2
- package/dist/vue.esm.js +169 -80
- package/dist/vue.js +169 -80
- package/dist/vue.min.js +2 -2
- package/dist/vue.runtime.common.dev.js +121 -62
- package/dist/vue.runtime.common.prod.js +2 -2
- package/dist/vue.runtime.esm.js +121 -62
- package/dist/vue.runtime.js +121 -62
- package/dist/vue.runtime.min.js +2 -2
- package/package.json +2 -2
- package/src/compiler/codeframe.js +7 -5
- package/src/compiler/codegen/events.js +1 -1
- package/src/compiler/codegen/index.js +38 -9
- package/src/compiler/parser/html-parser.js +3 -3
- package/src/compiler/parser/index.js +4 -3
- package/src/core/instance/lifecycle.js +5 -2
- package/src/core/instance/render-helpers/bind-object-props.js +5 -3
- package/src/core/instance/render-helpers/resolve-scoped-slots.js +7 -2
- package/src/core/observer/scheduler.js +17 -6
- package/src/core/util/error.js +24 -13
- package/src/core/util/lang.js +2 -2
- package/src/core/util/options.js +2 -2
- package/src/core/vdom/helpers/normalize-scoped-slots.js +14 -5
- package/src/core/vdom/helpers/resolve-async-component.js +25 -8
- package/src/platforms/web/runtime/modules/dom-props.js +15 -12
- 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/options.d.ts +3 -3
- package/types/vnode.d.ts +6 -2
- package/types/vue.d.ts +3 -3
package/README.md
CHANGED
|
@@ -40,6 +40,11 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
40
40
|
<table>
|
|
41
41
|
<tbody>
|
|
42
42
|
<tr>
|
|
43
|
+
<td align="center" valign="middle">
|
|
44
|
+
<a href="https://moduscreate.com/?utm_source=Vue&utm_medium=Partnership&utm_campaign=VueShip" target="_blank">
|
|
45
|
+
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/modus.png">
|
|
46
|
+
</a>
|
|
47
|
+
</td>
|
|
43
48
|
<td align="center" valign="middle">
|
|
44
49
|
<a href="https://www.bitsrc.io/?utm_source=vue&utm_medium=vue&utm_campaign=vue&utm_term=vue&utm_content=vue" target="_blank">
|
|
45
50
|
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/bit.png">
|
|
@@ -55,13 +60,13 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
55
60
|
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vueschool.png">
|
|
56
61
|
</a>
|
|
57
62
|
</td>
|
|
63
|
+
</tr><tr></tr>
|
|
64
|
+
<tr>
|
|
58
65
|
<td align="center" valign="middle">
|
|
59
66
|
<a href="https://vehikl.com/" target="_blank">
|
|
60
67
|
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vehikl.png">
|
|
61
68
|
</a>
|
|
62
69
|
</td>
|
|
63
|
-
</tr><tr></tr>
|
|
64
|
-
<tr>
|
|
65
70
|
<td align="center" valign="middle">
|
|
66
71
|
<a href="https://www.nativescript.org/vue?utm_source=vue-js-org&utm_medium=website&utm_campaign=nativescript-awareness" target="_blank">
|
|
67
72
|
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/nativescript.png">
|
|
@@ -145,28 +150,18 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
145
150
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vuejobs.png">
|
|
146
151
|
</a>
|
|
147
152
|
</td>
|
|
148
|
-
<td align="center" valign="middle">
|
|
149
|
-
<a href="https://www.valuecoders.com" target="_blank">
|
|
150
|
-
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/valuecoders.png">
|
|
151
|
-
</a>
|
|
152
|
-
</td>
|
|
153
153
|
<td align="center" valign="middle">
|
|
154
154
|
<a href="https://tidelift.com/subscription/npm/vue" target="_blank">
|
|
155
155
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/tidelift.png">
|
|
156
156
|
</a>
|
|
157
157
|
</td>
|
|
158
|
-
</tr><tr></tr>
|
|
159
|
-
<tr>
|
|
160
158
|
<td align="center" valign="middle">
|
|
161
|
-
<a href="
|
|
162
|
-
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/webdock.png">
|
|
163
|
-
</a>
|
|
164
|
-
</td>
|
|
165
|
-
<td align="center" valign="middle">
|
|
166
|
-
<a href="https://syncfusion.com/products/vue" target="_blank">
|
|
159
|
+
<a href="http://www.syncfusion.com/?utm_source=vuejs&utm_medium=list&utm_campaign=vuejsjslistcy19" target="_blank">
|
|
167
160
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/syncfusion.png">
|
|
168
161
|
</a>
|
|
169
162
|
</td>
|
|
163
|
+
</tr><tr></tr>
|
|
164
|
+
<tr>
|
|
170
165
|
<td align="center" valign="middle">
|
|
171
166
|
<a href="https://opteo.com/vue" target="_blank">
|
|
172
167
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/opteo.png">
|
|
@@ -187,8 +182,6 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
187
182
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/firestick_tricks.png">
|
|
188
183
|
</a>
|
|
189
184
|
</td>
|
|
190
|
-
</tr><tr></tr>
|
|
191
|
-
<tr>
|
|
192
185
|
<td align="center" valign="middle">
|
|
193
186
|
<a href="https://github.com/marcus-hiles" target="_blank">
|
|
194
187
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/marcus_hiles.png">
|
|
@@ -199,6 +192,8 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
199
192
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/intygrate.png">
|
|
200
193
|
</a>
|
|
201
194
|
</td>
|
|
195
|
+
</tr><tr></tr>
|
|
196
|
+
<tr>
|
|
202
197
|
<td align="center" valign="middle">
|
|
203
198
|
<a href="https://isleofcode.com/" target="_blank">
|
|
204
199
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/isle_of_code.png">
|
|
@@ -210,8 +205,18 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
210
205
|
</a>
|
|
211
206
|
</td>
|
|
212
207
|
<td align="center" valign="middle">
|
|
213
|
-
<a href="https://
|
|
214
|
-
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/
|
|
208
|
+
<a href="https://passionatepeople.io/" target="_blank">
|
|
209
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/passionate_people.png">
|
|
210
|
+
</a>
|
|
211
|
+
</td>
|
|
212
|
+
<td align="center" valign="middle">
|
|
213
|
+
<a href="https://www.bestvpn.co/" target="_blank">
|
|
214
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/bestvpn_co.png">
|
|
215
|
+
</a>
|
|
216
|
+
</td>
|
|
217
|
+
<td align="center" valign="middle">
|
|
218
|
+
<a href="http://en.shopware.com/" target="_blank">
|
|
219
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/shopware_ag.svg">
|
|
215
220
|
</a>
|
|
216
221
|
</td>
|
|
217
222
|
</tr><tr></tr>
|
package/dist/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
If you need to compile templates on the fly (e.g. passing a string to the `template` option, or mounting to an element using its in-DOM HTML as the template), you will need the compiler and thus the full build.
|
|
27
27
|
|
|
28
|
-
When using `vue-loader` or `vueify`, templates inside `*.vue` files are compiled into JavaScript at build time. You don't really need the compiler in the final bundle, and can therefore use the runtime-only build.
|
|
28
|
+
When using `vue-loader` or `vueify`, templates inside `*.vue` files are compiled into JavaScript at build time. You don't really need the compiler in the final bundle, and can therefore, use the runtime-only build.
|
|
29
29
|
|
|
30
30
|
Since the runtime-only builds are roughly 30% lighter-weight than their full-build counterparts, you should use it whenever you can. If you wish to use the full build instead, you need to configure an alias in your bundler.
|
|
31
31
|
|
package/dist/vue.common.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.6.
|
|
2
|
+
* Vue.js v2.6.10
|
|
3
3
|
* (c) 2014-2019 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -477,7 +477,7 @@ var config = ({
|
|
|
477
477
|
* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
|
|
478
478
|
* skipping \u10000-\uEFFFF due to it freezing up PhantomJS
|
|
479
479
|
*/
|
|
480
|
-
var
|
|
480
|
+
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/;
|
|
481
481
|
|
|
482
482
|
/**
|
|
483
483
|
* Check if a string starts with $ or _
|
|
@@ -502,7 +502,7 @@ function def (obj, key, val, enumerable) {
|
|
|
502
502
|
/**
|
|
503
503
|
* Parse simple path.
|
|
504
504
|
*/
|
|
505
|
-
var bailRE = new RegExp(("[^" +
|
|
505
|
+
var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
|
|
506
506
|
function parsePath (path) {
|
|
507
507
|
if (bailRE.test(path)) {
|
|
508
508
|
return
|
|
@@ -1406,7 +1406,7 @@ function checkComponents (options) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
1408
|
function validateComponentName (name) {
|
|
1409
|
-
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" +
|
|
1409
|
+
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
|
|
1410
1410
|
warn(
|
|
1411
1411
|
'Invalid component name: "' + name + '". Component names ' +
|
|
1412
1412
|
'should conform to valid custom element name in html5 specification.'
|
|
@@ -1821,23 +1821,30 @@ function isBoolean () {
|
|
|
1821
1821
|
/* */
|
|
1822
1822
|
|
|
1823
1823
|
function handleError (err, vm, info) {
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1824
|
+
// Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
|
|
1825
|
+
// See: https://github.com/vuejs/vuex/issues/1505
|
|
1826
|
+
pushTarget();
|
|
1827
|
+
try {
|
|
1828
|
+
if (vm) {
|
|
1829
|
+
var cur = vm;
|
|
1830
|
+
while ((cur = cur.$parent)) {
|
|
1831
|
+
var hooks = cur.$options.errorCaptured;
|
|
1832
|
+
if (hooks) {
|
|
1833
|
+
for (var i = 0; i < hooks.length; i++) {
|
|
1834
|
+
try {
|
|
1835
|
+
var capture = hooks[i].call(cur, err, vm, info) === false;
|
|
1836
|
+
if (capture) { return }
|
|
1837
|
+
} catch (e) {
|
|
1838
|
+
globalHandleError(e, cur, 'errorCaptured hook');
|
|
1839
|
+
}
|
|
1835
1840
|
}
|
|
1836
1841
|
}
|
|
1837
1842
|
}
|
|
1838
1843
|
}
|
|
1844
|
+
globalHandleError(err, vm, info);
|
|
1845
|
+
} finally {
|
|
1846
|
+
popTarget();
|
|
1839
1847
|
}
|
|
1840
|
-
globalHandleError(err, vm, info);
|
|
1841
1848
|
}
|
|
1842
1849
|
|
|
1843
1850
|
function invokeWithErrorHandling (
|
|
@@ -1850,8 +1857,11 @@ function invokeWithErrorHandling (
|
|
|
1850
1857
|
var res;
|
|
1851
1858
|
try {
|
|
1852
1859
|
res = args ? handler.apply(context, args) : handler.call(context);
|
|
1853
|
-
if (res && !res._isVue && isPromise(res)) {
|
|
1860
|
+
if (res && !res._isVue && isPromise(res) && !res._handled) {
|
|
1854
1861
|
res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
|
|
1862
|
+
// issue #9511
|
|
1863
|
+
// avoid catch triggering multiple times when nested calls
|
|
1864
|
+
res._handled = true;
|
|
1855
1865
|
}
|
|
1856
1866
|
} catch (e) {
|
|
1857
1867
|
handleError(e, vm, info);
|
|
@@ -2534,32 +2544,37 @@ function normalizeScopedSlots (
|
|
|
2534
2544
|
prevSlots
|
|
2535
2545
|
) {
|
|
2536
2546
|
var res;
|
|
2547
|
+
var hasNormalSlots = Object.keys(normalSlots).length > 0;
|
|
2548
|
+
var isStable = slots ? !!slots.$stable : !hasNormalSlots;
|
|
2549
|
+
var key = slots && slots.$key;
|
|
2537
2550
|
if (!slots) {
|
|
2538
2551
|
res = {};
|
|
2539
2552
|
} else if (slots._normalized) {
|
|
2540
2553
|
// fast path 1: child component re-render only, parent did not change
|
|
2541
2554
|
return slots._normalized
|
|
2542
2555
|
} else if (
|
|
2543
|
-
|
|
2556
|
+
isStable &&
|
|
2544
2557
|
prevSlots &&
|
|
2545
2558
|
prevSlots !== emptyObject &&
|
|
2546
|
-
|
|
2559
|
+
key === prevSlots.$key &&
|
|
2560
|
+
!hasNormalSlots &&
|
|
2561
|
+
!prevSlots.$hasNormal
|
|
2547
2562
|
) {
|
|
2548
2563
|
// fast path 2: stable scoped slots w/ no normal slots to proxy,
|
|
2549
2564
|
// only need to normalize once
|
|
2550
2565
|
return prevSlots
|
|
2551
2566
|
} else {
|
|
2552
2567
|
res = {};
|
|
2553
|
-
for (var key in slots) {
|
|
2554
|
-
if (slots[key] && key[0] !== '$') {
|
|
2555
|
-
res[key] = normalizeScopedSlot(normalSlots, key, slots[key]);
|
|
2568
|
+
for (var key$1 in slots) {
|
|
2569
|
+
if (slots[key$1] && key$1[0] !== '$') {
|
|
2570
|
+
res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
|
|
2556
2571
|
}
|
|
2557
2572
|
}
|
|
2558
2573
|
}
|
|
2559
2574
|
// expose normal slots on scopedSlots
|
|
2560
|
-
for (var key$
|
|
2561
|
-
if (!(key$
|
|
2562
|
-
res[key$
|
|
2575
|
+
for (var key$2 in normalSlots) {
|
|
2576
|
+
if (!(key$2 in res)) {
|
|
2577
|
+
res[key$2] = proxyNormalSlot(normalSlots, key$2);
|
|
2563
2578
|
}
|
|
2564
2579
|
}
|
|
2565
2580
|
// avoriaz seems to mock a non-extensible $scopedSlots object
|
|
@@ -2567,7 +2582,9 @@ function normalizeScopedSlots (
|
|
|
2567
2582
|
if (slots && Object.isExtensible(slots)) {
|
|
2568
2583
|
(slots)._normalized = res;
|
|
2569
2584
|
}
|
|
2570
|
-
def(res, '$stable',
|
|
2585
|
+
def(res, '$stable', isStable);
|
|
2586
|
+
def(res, '$key', key);
|
|
2587
|
+
def(res, '$hasNormal', hasNormalSlots);
|
|
2571
2588
|
return res
|
|
2572
2589
|
}
|
|
2573
2590
|
|
|
@@ -2577,8 +2594,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
|
|
|
2577
2594
|
res = res && typeof res === 'object' && !Array.isArray(res)
|
|
2578
2595
|
? [res] // single vnode
|
|
2579
2596
|
: normalizeChildren(res);
|
|
2580
|
-
return res &&
|
|
2581
|
-
|
|
2597
|
+
return res && (
|
|
2598
|
+
res.length === 0 ||
|
|
2599
|
+
(res.length === 1 && res[0].isComment) // #9658
|
|
2600
|
+
) ? undefined
|
|
2582
2601
|
: res
|
|
2583
2602
|
};
|
|
2584
2603
|
// this is a slot using the new v-slot syntax without scope. although it is
|
|
@@ -2758,12 +2777,13 @@ function bindObjectProps (
|
|
|
2758
2777
|
: data.attrs || (data.attrs = {});
|
|
2759
2778
|
}
|
|
2760
2779
|
var camelizedKey = camelize(key);
|
|
2761
|
-
|
|
2780
|
+
var hyphenatedKey = hyphenate(key);
|
|
2781
|
+
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
|
|
2762
2782
|
hash[key] = value[key];
|
|
2763
2783
|
|
|
2764
2784
|
if (isSync) {
|
|
2765
2785
|
var on = data.on || (data.on = {});
|
|
2766
|
-
on[("update:" +
|
|
2786
|
+
on[("update:" + key)] = function ($event) {
|
|
2767
2787
|
value[key] = $event;
|
|
2768
2788
|
};
|
|
2769
2789
|
}
|
|
@@ -2862,14 +2882,16 @@ function bindObjectListeners (data, value) {
|
|
|
2862
2882
|
|
|
2863
2883
|
function resolveScopedSlots (
|
|
2864
2884
|
fns, // see flow/vnode
|
|
2885
|
+
res,
|
|
2886
|
+
// the following are added in 2.6
|
|
2865
2887
|
hasDynamicKeys,
|
|
2866
|
-
|
|
2888
|
+
contentHashKey
|
|
2867
2889
|
) {
|
|
2868
2890
|
res = res || { $stable: !hasDynamicKeys };
|
|
2869
2891
|
for (var i = 0; i < fns.length; i++) {
|
|
2870
2892
|
var slot = fns[i];
|
|
2871
2893
|
if (Array.isArray(slot)) {
|
|
2872
|
-
resolveScopedSlots(slot,
|
|
2894
|
+
resolveScopedSlots(slot, res, hasDynamicKeys);
|
|
2873
2895
|
} else if (slot) {
|
|
2874
2896
|
// marker for reverse proxying v-slot without scope on this.$slots
|
|
2875
2897
|
if (slot.proxy) {
|
|
@@ -2878,6 +2900,9 @@ function resolveScopedSlots (
|
|
|
2878
2900
|
res[slot.key] = slot.fn;
|
|
2879
2901
|
}
|
|
2880
2902
|
}
|
|
2903
|
+
if (contentHashKey) {
|
|
2904
|
+
(res).$key = contentHashKey;
|
|
2905
|
+
}
|
|
2881
2906
|
return res
|
|
2882
2907
|
}
|
|
2883
2908
|
|
|
@@ -3592,17 +3617,23 @@ function resolveAsyncComponent (
|
|
|
3592
3617
|
return factory.resolved
|
|
3593
3618
|
}
|
|
3594
3619
|
|
|
3620
|
+
var owner = currentRenderingInstance;
|
|
3621
|
+
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
|
|
3622
|
+
// already pending
|
|
3623
|
+
factory.owners.push(owner);
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3595
3626
|
if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
|
|
3596
3627
|
return factory.loadingComp
|
|
3597
3628
|
}
|
|
3598
3629
|
|
|
3599
|
-
|
|
3600
|
-
if (isDef(factory.owners)) {
|
|
3601
|
-
// already pending
|
|
3602
|
-
factory.owners.push(owner);
|
|
3603
|
-
} else {
|
|
3630
|
+
if (owner && !isDef(factory.owners)) {
|
|
3604
3631
|
var owners = factory.owners = [owner];
|
|
3605
3632
|
var sync = true;
|
|
3633
|
+
var timerLoading = null;
|
|
3634
|
+
var timerTimeout = null
|
|
3635
|
+
|
|
3636
|
+
;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
|
|
3606
3637
|
|
|
3607
3638
|
var forceRender = function (renderCompleted) {
|
|
3608
3639
|
for (var i = 0, l = owners.length; i < l; i++) {
|
|
@@ -3611,6 +3642,14 @@ function resolveAsyncComponent (
|
|
|
3611
3642
|
|
|
3612
3643
|
if (renderCompleted) {
|
|
3613
3644
|
owners.length = 0;
|
|
3645
|
+
if (timerLoading !== null) {
|
|
3646
|
+
clearTimeout(timerLoading);
|
|
3647
|
+
timerLoading = null;
|
|
3648
|
+
}
|
|
3649
|
+
if (timerTimeout !== null) {
|
|
3650
|
+
clearTimeout(timerTimeout);
|
|
3651
|
+
timerTimeout = null;
|
|
3652
|
+
}
|
|
3614
3653
|
}
|
|
3615
3654
|
};
|
|
3616
3655
|
|
|
@@ -3657,7 +3696,8 @@ function resolveAsyncComponent (
|
|
|
3657
3696
|
if (res.delay === 0) {
|
|
3658
3697
|
factory.loading = true;
|
|
3659
3698
|
} else {
|
|
3660
|
-
setTimeout(function () {
|
|
3699
|
+
timerLoading = setTimeout(function () {
|
|
3700
|
+
timerLoading = null;
|
|
3661
3701
|
if (isUndef(factory.resolved) && isUndef(factory.error)) {
|
|
3662
3702
|
factory.loading = true;
|
|
3663
3703
|
forceRender(false);
|
|
@@ -3667,7 +3707,8 @@ function resolveAsyncComponent (
|
|
|
3667
3707
|
}
|
|
3668
3708
|
|
|
3669
3709
|
if (isDef(res.timeout)) {
|
|
3670
|
-
setTimeout(function () {
|
|
3710
|
+
timerTimeout = setTimeout(function () {
|
|
3711
|
+
timerTimeout = null;
|
|
3671
3712
|
if (isUndef(factory.resolved)) {
|
|
3672
3713
|
reject(
|
|
3673
3714
|
"timeout (" + (res.timeout) + "ms)"
|
|
@@ -4055,9 +4096,12 @@ function updateChildComponent (
|
|
|
4055
4096
|
// check if there are dynamic scopedSlots (hand-written or compiled but with
|
|
4056
4097
|
// dynamic slot names). Static scoped slots compiled from template has the
|
|
4057
4098
|
// "$stable" marker.
|
|
4099
|
+
var newScopedSlots = parentVnode.data.scopedSlots;
|
|
4100
|
+
var oldScopedSlots = vm.$scopedSlots;
|
|
4058
4101
|
var hasDynamicScopedSlot = !!(
|
|
4059
|
-
(
|
|
4060
|
-
(
|
|
4102
|
+
(newScopedSlots && !newScopedSlots.$stable) ||
|
|
4103
|
+
(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
|
|
4104
|
+
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
|
|
4061
4105
|
);
|
|
4062
4106
|
|
|
4063
4107
|
// Any static slot children from the parent may have changed during parent's
|
|
@@ -4210,11 +4254,21 @@ var getNow = Date.now;
|
|
|
4210
4254
|
// timestamp can either be hi-res (relative to page load) or low-res
|
|
4211
4255
|
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
4212
4256
|
// same timestamp type when saving the flush timestamp.
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4257
|
+
// All IE versions use low-res event timestamps, and have problematic clock
|
|
4258
|
+
// implementations (#9632)
|
|
4259
|
+
if (inBrowser && !isIE) {
|
|
4260
|
+
var performance = window.performance;
|
|
4261
|
+
if (
|
|
4262
|
+
performance &&
|
|
4263
|
+
typeof performance.now === 'function' &&
|
|
4264
|
+
getNow() > document.createEvent('Event').timeStamp
|
|
4265
|
+
) {
|
|
4266
|
+
// if the event timestamp, although evaluated AFTER the Date.now(), is
|
|
4267
|
+
// smaller than it, it means the event is using a hi-res timestamp,
|
|
4268
|
+
// and we need to use the hi-res version for event listener timestamps as
|
|
4269
|
+
// well.
|
|
4270
|
+
getNow = function () { return performance.now(); };
|
|
4271
|
+
}
|
|
4218
4272
|
}
|
|
4219
4273
|
|
|
4220
4274
|
/**
|
|
@@ -5379,7 +5433,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
5379
5433
|
value: FunctionalRenderContext
|
|
5380
5434
|
});
|
|
5381
5435
|
|
|
5382
|
-
Vue.version = '2.6.
|
|
5436
|
+
Vue.version = '2.6.10';
|
|
5383
5437
|
|
|
5384
5438
|
/* */
|
|
5385
5439
|
|
|
@@ -7471,8 +7525,10 @@ function add$1 (
|
|
|
7471
7525
|
e.target === e.currentTarget ||
|
|
7472
7526
|
// event is fired after handler attachment
|
|
7473
7527
|
e.timeStamp >= attachedTimestamp ||
|
|
7474
|
-
//
|
|
7475
|
-
|
|
7528
|
+
// bail for environments that have buggy event.timeStamp implementations
|
|
7529
|
+
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
|
|
7530
|
+
// #9681 QtWebEngine event.timeStamp is negative value
|
|
7531
|
+
e.timeStamp <= 0 ||
|
|
7476
7532
|
// #9448 bail if event is fired in another document in a multi-page
|
|
7477
7533
|
// electron/nw.js app, since event.timeStamp will be using a different
|
|
7478
7534
|
// starting reference
|
|
@@ -7539,10 +7595,11 @@ function updateDOMProps (oldVnode, vnode) {
|
|
|
7539
7595
|
}
|
|
7540
7596
|
|
|
7541
7597
|
for (key in oldProps) {
|
|
7542
|
-
if (
|
|
7598
|
+
if (!(key in props)) {
|
|
7543
7599
|
elm[key] = '';
|
|
7544
7600
|
}
|
|
7545
7601
|
}
|
|
7602
|
+
|
|
7546
7603
|
for (key in props) {
|
|
7547
7604
|
cur = props[key];
|
|
7548
7605
|
// ignore children if the node has textContent or innerHTML,
|
|
@@ -7558,15 +7615,7 @@ function updateDOMProps (oldVnode, vnode) {
|
|
|
7558
7615
|
}
|
|
7559
7616
|
}
|
|
7560
7617
|
|
|
7561
|
-
|
|
7562
|
-
// the only exception is `value` where the DOM value may be temporarily
|
|
7563
|
-
// out of sync with VDOM state due to focus, composition and modifiers.
|
|
7564
|
-
// This also covers #4521 by skipping the unnecesarry `checked` update.
|
|
7565
|
-
if (key !== 'value' && cur === oldProps[key]) {
|
|
7566
|
-
continue
|
|
7567
|
-
}
|
|
7568
|
-
|
|
7569
|
-
if (key === 'value') {
|
|
7618
|
+
if (key === 'value' && elm.tagName !== 'PROGRESS') {
|
|
7570
7619
|
// store value as _value as well since
|
|
7571
7620
|
// non-string values will be stringified
|
|
7572
7621
|
elm._value = cur;
|
|
@@ -7586,8 +7635,18 @@ function updateDOMProps (oldVnode, vnode) {
|
|
|
7586
7635
|
while (svg.firstChild) {
|
|
7587
7636
|
elm.appendChild(svg.firstChild);
|
|
7588
7637
|
}
|
|
7589
|
-
} else
|
|
7590
|
-
|
|
7638
|
+
} else if (
|
|
7639
|
+
// skip the update if old and new VDOM state is the same.
|
|
7640
|
+
// `value` is handled separately because the DOM value may be temporarily
|
|
7641
|
+
// out of sync with VDOM state due to focus, composition and modifiers.
|
|
7642
|
+
// This #4521 by skipping the unnecesarry `checked` update.
|
|
7643
|
+
cur !== oldProps[key]
|
|
7644
|
+
) {
|
|
7645
|
+
// some property updates can throw
|
|
7646
|
+
// e.g. `value` on <progress> w/ non-finite value
|
|
7647
|
+
try {
|
|
7648
|
+
elm[key] = cur;
|
|
7649
|
+
} catch (e) {}
|
|
7591
7650
|
}
|
|
7592
7651
|
}
|
|
7593
7652
|
}
|
|
@@ -8088,8 +8147,8 @@ function enter (vnode, toggleDisplay) {
|
|
|
8088
8147
|
var context = activeInstance;
|
|
8089
8148
|
var transitionNode = activeInstance.$vnode;
|
|
8090
8149
|
while (transitionNode && transitionNode.parent) {
|
|
8091
|
-
transitionNode = transitionNode.parent;
|
|
8092
8150
|
context = transitionNode.context;
|
|
8151
|
+
transitionNode = transitionNode.parent;
|
|
8093
8152
|
}
|
|
8094
8153
|
|
|
8095
8154
|
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
|
@@ -9179,7 +9238,7 @@ var isNonPhrasingTag = makeMap(
|
|
|
9179
9238
|
// Regular Expressions for parsing tags and attributes
|
|
9180
9239
|
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
|
9181
9240
|
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
|
9182
|
-
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" +
|
|
9241
|
+
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
|
|
9183
9242
|
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
|
|
9184
9243
|
var startTagOpen = new RegExp(("^<" + qnameCapture));
|
|
9185
9244
|
var startTagClose = /^\s*(\/?)>/;
|
|
@@ -9441,7 +9500,7 @@ function parseHTML (html, options) {
|
|
|
9441
9500
|
) {
|
|
9442
9501
|
options.warn(
|
|
9443
9502
|
("tag <" + (stack[i].tag) + "> has no matching end tag."),
|
|
9444
|
-
{ start: stack[i].start }
|
|
9503
|
+
{ start: stack[i].start, end: stack[i].end }
|
|
9445
9504
|
);
|
|
9446
9505
|
}
|
|
9447
9506
|
if (options.end) {
|
|
@@ -9478,7 +9537,7 @@ var dynamicArgRE = /^\[.*\]$/;
|
|
|
9478
9537
|
|
|
9479
9538
|
var argRE = /:(.*)$/;
|
|
9480
9539
|
var bindRE = /^:|^\.|^v-bind:/;
|
|
9481
|
-
var modifierRE = /\.[
|
|
9540
|
+
var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
|
|
9482
9541
|
|
|
9483
9542
|
var slotRE = /^v-slot(:|$)|^#/;
|
|
9484
9543
|
|
|
@@ -9655,7 +9714,7 @@ function parse (
|
|
|
9655
9714
|
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
|
|
9656
9715
|
shouldKeepComment: options.comments,
|
|
9657
9716
|
outputSourceRange: options.outputSourceRange,
|
|
9658
|
-
start: function start (tag, attrs, unary, start$1) {
|
|
9717
|
+
start: function start (tag, attrs, unary, start$1, end) {
|
|
9659
9718
|
// check namespace.
|
|
9660
9719
|
// inherit parent ns if there is one
|
|
9661
9720
|
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
|
|
@@ -9674,6 +9733,7 @@ function parse (
|
|
|
9674
9733
|
{
|
|
9675
9734
|
if (options.outputSourceRange) {
|
|
9676
9735
|
element.start = start$1;
|
|
9736
|
+
element.end = end;
|
|
9677
9737
|
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
|
|
9678
9738
|
cumulated[attr.name] = attr;
|
|
9679
9739
|
return cumulated
|
|
@@ -9795,7 +9855,7 @@ function parse (
|
|
|
9795
9855
|
text = preserveWhitespace ? ' ' : '';
|
|
9796
9856
|
}
|
|
9797
9857
|
if (text) {
|
|
9798
|
-
if (whitespaceOption === 'condense') {
|
|
9858
|
+
if (!inPre && whitespaceOption === 'condense') {
|
|
9799
9859
|
// condense consecutive whitespaces into single space
|
|
9800
9860
|
text = text.replace(whitespaceRE$1, ' ');
|
|
9801
9861
|
}
|
|
@@ -10656,7 +10716,7 @@ function isDirectChildOfTemplateFor (node) {
|
|
|
10656
10716
|
|
|
10657
10717
|
/* */
|
|
10658
10718
|
|
|
10659
|
-
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
|
|
10719
|
+
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/;
|
|
10660
10720
|
var fnInvokeRE = /\([^)]*?\);*$/;
|
|
10661
10721
|
var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
|
|
10662
10722
|
|
|
@@ -11158,7 +11218,7 @@ function genScopedSlots (
|
|
|
11158
11218
|
// components with only scoped slots to skip forced updates from parent.
|
|
11159
11219
|
// but in some cases we have to bail-out of this optimization
|
|
11160
11220
|
// for example if the slot contains dynamic names, has v-if or v-for on them...
|
|
11161
|
-
var needsForceUpdate = Object.keys(slots).some(function (key) {
|
|
11221
|
+
var needsForceUpdate = el.for || Object.keys(slots).some(function (key) {
|
|
11162
11222
|
var slot = slots[key];
|
|
11163
11223
|
return (
|
|
11164
11224
|
slot.slotTargetDynamic ||
|
|
@@ -11167,22 +11227,49 @@ function genScopedSlots (
|
|
|
11167
11227
|
containsSlotChild(slot) // is passing down slot from parent which may be dynamic
|
|
11168
11228
|
)
|
|
11169
11229
|
});
|
|
11170
|
-
|
|
11171
|
-
// #
|
|
11230
|
+
|
|
11231
|
+
// #9534: if a component with scoped slots is inside a conditional branch,
|
|
11232
|
+
// it's possible for the same component to be reused but with different
|
|
11233
|
+
// compiled slot content. To avoid that, we generate a unique key based on
|
|
11234
|
+
// the generated code of all the slot contents.
|
|
11235
|
+
var needsKey = !!el.if;
|
|
11236
|
+
|
|
11237
|
+
// OR when it is inside another scoped slot or v-for (the reactivity may be
|
|
11238
|
+
// disconnected due to the intermediate scope variable)
|
|
11239
|
+
// #9438, #9506
|
|
11240
|
+
// TODO: this can be further optimized by properly analyzing in-scope bindings
|
|
11241
|
+
// and skip force updating ones that do not actually use scope variables.
|
|
11172
11242
|
if (!needsForceUpdate) {
|
|
11173
11243
|
var parent = el.parent;
|
|
11174
11244
|
while (parent) {
|
|
11175
|
-
if (
|
|
11245
|
+
if (
|
|
11246
|
+
(parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
|
|
11247
|
+
parent.for
|
|
11248
|
+
) {
|
|
11176
11249
|
needsForceUpdate = true;
|
|
11177
11250
|
break
|
|
11178
11251
|
}
|
|
11252
|
+
if (parent.if) {
|
|
11253
|
+
needsKey = true;
|
|
11254
|
+
}
|
|
11179
11255
|
parent = parent.parent;
|
|
11180
11256
|
}
|
|
11181
11257
|
}
|
|
11182
11258
|
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11259
|
+
var generatedSlots = Object.keys(slots)
|
|
11260
|
+
.map(function (key) { return genScopedSlot(slots[key], state); })
|
|
11261
|
+
.join(',');
|
|
11262
|
+
|
|
11263
|
+
return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")")
|
|
11264
|
+
}
|
|
11265
|
+
|
|
11266
|
+
function hash(str) {
|
|
11267
|
+
var hash = 5381;
|
|
11268
|
+
var i = str.length;
|
|
11269
|
+
while(i) {
|
|
11270
|
+
hash = (hash * 33) ^ str.charCodeAt(--i);
|
|
11271
|
+
}
|
|
11272
|
+
return hash >>> 0
|
|
11186
11273
|
}
|
|
11187
11274
|
|
|
11188
11275
|
function containsSlotChild (el) {
|
|
@@ -11517,11 +11604,13 @@ function generateCodeFrame (
|
|
|
11517
11604
|
|
|
11518
11605
|
function repeat$1 (str, n) {
|
|
11519
11606
|
var result = '';
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11607
|
+
if (n > 0) {
|
|
11608
|
+
while (true) { // eslint-disable-line
|
|
11609
|
+
if (n & 1) { result += str; }
|
|
11610
|
+
n >>>= 1;
|
|
11611
|
+
if (n <= 0) { break }
|
|
11612
|
+
str += str;
|
|
11613
|
+
}
|
|
11525
11614
|
}
|
|
11526
11615
|
return result
|
|
11527
11616
|
}
|