vue 2.6.12 → 2.6.13
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 +82 -8
- package/dist/vue.common.dev.js +125 -76
- package/dist/vue.common.prod.js +3 -3
- package/dist/vue.esm.browser.js +119 -76
- package/dist/vue.esm.browser.min.js +3 -3
- package/dist/vue.esm.js +125 -76
- package/dist/vue.js +125 -76
- package/dist/vue.min.js +3 -3
- package/dist/vue.runtime.common.dev.js +112 -68
- package/dist/vue.runtime.common.prod.js +3 -3
- package/dist/vue.runtime.esm.js +112 -68
- package/dist/vue.runtime.js +112 -68
- package/dist/vue.runtime.min.js +3 -3
- package/package.json +2 -2
- package/src/compiler/codegen/events.js +2 -2
- package/src/compiler/codegen/index.js +3 -2
- package/src/compiler/parser/html-parser.js +1 -1
- package/src/compiler/parser/index.js +7 -3
- package/src/core/components/keep-alive.js +42 -14
- package/src/core/instance/lifecycle.js +2 -1
- package/src/core/instance/proxy.js +1 -1
- package/src/core/instance/render-helpers/check-keycodes.js +1 -0
- package/src/core/instance/render-helpers/render-slot.js +10 -8
- package/src/core/instance/state.js +8 -6
- package/src/core/observer/watcher.js +3 -5
- package/src/core/util/props.js +24 -15
- package/src/core/vdom/create-component.js +4 -2
- package/src/core/vdom/create-element.js +1 -1
- package/src/core/vdom/helpers/normalize-scoped-slots.js +4 -2
- package/src/core/vdom/patch.js +2 -2
- package/src/platforms/web/runtime/modules/attrs.js +3 -3
- package/src/platforms/web/server/modules/attrs.js +4 -0
- package/src/platforms/web/server/modules/dom-props.js +2 -2
- package/src/platforms/web/util/attrs.js +1 -1
- package/src/platforms/web/util/element.js +1 -1
- package/src/server/template-renderer/create-async-file-mapper.js +5 -1
- package/types/options.d.ts +2 -2
- package/types/vnode.d.ts +2 -2
- package/types/vue.d.ts +5 -1
- package/src/.DS_Store +0 -0
- package/src/compiler/.DS_Store +0 -0
- package/src/platforms/.DS_Store +0 -0
- package/src/platforms/weex/.DS_Store +0 -0
- package/src/platforms/weex/compiler/.DS_Store +0 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Vue.js is an MIT-licensed open source project with its ongoing development made
|
|
|
17
17
|
|
|
18
18
|
- [Become a backer or sponsor on Patreon](https://www.patreon.com/evanyou).
|
|
19
19
|
- [Become a backer or sponsor on Open Collective](https://opencollective.com/vuejs).
|
|
20
|
-
- [One-time donation via PayPal or crypto-currencies
|
|
20
|
+
- [One-time donation via PayPal or crypto-currencies](https://vuejs.org/support-vuejs/#One-time-Donations).
|
|
21
21
|
|
|
22
22
|
#### What's the difference between Patreon and OpenCollective?
|
|
23
23
|
|
|
@@ -67,6 +67,16 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
67
67
|
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/storyblok.png">
|
|
68
68
|
</a>
|
|
69
69
|
</td>
|
|
70
|
+
<td align="center" valign="middle">
|
|
71
|
+
<a href="https://ionicframework.com/vue?utm_source=partner&utm_medium=referral&utm_campaign=vuesponsorship&utm_content=vuedocs" target="_blank">
|
|
72
|
+
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/ionic.png">
|
|
73
|
+
</a>
|
|
74
|
+
</td>
|
|
75
|
+
<td align="center" valign="middle">
|
|
76
|
+
<a href="https://nuxtjs.org/" target="_blank">
|
|
77
|
+
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/nuxt.png">
|
|
78
|
+
</a>
|
|
79
|
+
</td>
|
|
70
80
|
</tr><tr></tr>
|
|
71
81
|
</tbody>
|
|
72
82
|
</table>
|
|
@@ -114,13 +124,13 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
114
124
|
</a>
|
|
115
125
|
</td>
|
|
116
126
|
<td align="center" valign="middle">
|
|
117
|
-
<a href="https://
|
|
118
|
-
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/
|
|
127
|
+
<a href="https://neds.com.au/" target="_blank">
|
|
128
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/neds.png">
|
|
119
129
|
</a>
|
|
120
130
|
</td>
|
|
121
131
|
<td align="center" valign="middle">
|
|
122
|
-
<a href="https://
|
|
123
|
-
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/
|
|
132
|
+
<a href="https://icons8.com/" target="_blank">
|
|
133
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/icons_8.png">
|
|
124
134
|
</a>
|
|
125
135
|
</td>
|
|
126
136
|
</tr><tr></tr>
|
|
@@ -204,6 +214,65 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
204
214
|
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/moovweb.png">
|
|
205
215
|
</a>
|
|
206
216
|
</td>
|
|
217
|
+
<td align="center" valign="middle">
|
|
218
|
+
<a href="https://vpn-review.com/netflix-vpn" target="_blank">
|
|
219
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vpn_review.png">
|
|
220
|
+
</a>
|
|
221
|
+
</td>
|
|
222
|
+
<td align="center" valign="middle">
|
|
223
|
+
<a href="https://cosmos.network/" target="_blank">
|
|
224
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/tendermint.png">
|
|
225
|
+
</a>
|
|
226
|
+
</td>
|
|
227
|
+
<td align="center" valign="middle">
|
|
228
|
+
<a href="https://www.okayhq.com/" target="_blank">
|
|
229
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/okay.png">
|
|
230
|
+
</a>
|
|
231
|
+
</td>
|
|
232
|
+
</tr><tr></tr>
|
|
233
|
+
<tr>
|
|
234
|
+
<td align="center" valign="middle">
|
|
235
|
+
<a href="https://www.vpsserver.com" target="_blank">
|
|
236
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vpsserver_com.png">
|
|
237
|
+
</a>
|
|
238
|
+
</td>
|
|
239
|
+
<td align="center" valign="middle">
|
|
240
|
+
<a href="https://aussiecasinohex.com/" target="_blank">
|
|
241
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/aussiecasinohex.svg?sanitize=true">
|
|
242
|
+
</a>
|
|
243
|
+
</td>
|
|
244
|
+
<td align="center" valign="middle">
|
|
245
|
+
<a href="https://litslink.com" target="_blank">
|
|
246
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/litslink.png">
|
|
247
|
+
</a>
|
|
248
|
+
</td>
|
|
249
|
+
<td align="center" valign="middle">
|
|
250
|
+
<a href="https://newicon.net" target="_blank">
|
|
251
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/newicon.png">
|
|
252
|
+
</a>
|
|
253
|
+
</td>
|
|
254
|
+
<td align="center" valign="middle">
|
|
255
|
+
<a href="https://lowdefy.com?k=w432" target="_blank">
|
|
256
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/lowdefy.png">
|
|
257
|
+
</a>
|
|
258
|
+
</td>
|
|
259
|
+
<td align="center" valign="middle">
|
|
260
|
+
<a href="https://quickbookstoolhub.com/" target="_blank">
|
|
261
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/quickbooks_tool_hub.png">
|
|
262
|
+
</a>
|
|
263
|
+
</td>
|
|
264
|
+
</tr><tr></tr>
|
|
265
|
+
<tr>
|
|
266
|
+
<td align="center" valign="middle">
|
|
267
|
+
<a href="https://linecorp.com" target="_blank">
|
|
268
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/line_corporation.png">
|
|
269
|
+
</a>
|
|
270
|
+
</td>
|
|
271
|
+
<td align="center" valign="middle">
|
|
272
|
+
<a href="https://exmax.it/" target="_blank">
|
|
273
|
+
<img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/exmax.png">
|
|
274
|
+
</a>
|
|
275
|
+
</td>
|
|
207
276
|
</tr><tr></tr>
|
|
208
277
|
</tbody>
|
|
209
278
|
</table>
|
|
@@ -223,6 +292,11 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
|
|
|
223
292
|
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/2/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/2/avatar.svg?sanitize=true" height="60px"></a>
|
|
224
293
|
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/3/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/3/avatar.svg?sanitize=true" height="60px"></a>
|
|
225
294
|
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/4/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/4/avatar.svg?sanitize=true" height="60px"></a>
|
|
295
|
+
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/5/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/5/avatar.svg?sanitize=true" height="60px"></a>
|
|
296
|
+
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/6/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/6/avatar.svg?sanitize=true" height="60px"></a>
|
|
297
|
+
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/7/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/7/avatar.svg?sanitize=true" height="60px"></a>
|
|
298
|
+
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/8/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/8/avatar.svg?sanitize=true" height="60px"></a>
|
|
299
|
+
<a href="https://opencollective.com/vuejs/tiers/gold-sponsors/9/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/9/avatar.svg?sanitize=true" height="60px"></a><a href="https://opencollective.com/vuejs/tiers/gold-sponsors/10/website" target="_blank" rel="noopener noreferrer"><img src="https://opencollective.com/vuejs/tiers/gold-sponsors/10/avatar.svg?sanitize=true" height="60px"></a>
|
|
226
300
|
|
|
227
301
|
---
|
|
228
302
|
|
|
@@ -232,7 +306,7 @@ Vue (pronounced `/vjuː/`, like view) is a **progressive framework** for buildin
|
|
|
232
306
|
|
|
233
307
|
#### Browser Compatibility
|
|
234
308
|
|
|
235
|
-
Vue.js supports all browsers that are [ES5-compliant](
|
|
309
|
+
Vue.js supports all browsers that are [ES5-compliant](https://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
|
|
236
310
|
|
|
237
311
|
## Ecosystem
|
|
238
312
|
|
|
@@ -280,7 +354,7 @@ To check out [live examples](https://vuejs.org/v2/examples/) and docs, visit [vu
|
|
|
280
354
|
|
|
281
355
|
## Questions
|
|
282
356
|
|
|
283
|
-
For questions and support please use [the official forum](
|
|
357
|
+
For questions and support please use [the official forum](https://forum.vuejs.org) or [community chat](https://chat.vuejs.org/). The issue list of this repo is **exclusively** for bug reports and feature requests.
|
|
284
358
|
|
|
285
359
|
## Issues
|
|
286
360
|
|
|
@@ -307,6 +381,6 @@ Thank you to all the people who already contributed to Vue!
|
|
|
307
381
|
|
|
308
382
|
## License
|
|
309
383
|
|
|
310
|
-
[MIT](
|
|
384
|
+
[MIT](https://opensource.org/licenses/MIT)
|
|
311
385
|
|
|
312
386
|
Copyright (c) 2013-present, Yuxi (Evan) You
|
package/dist/vue.common.dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.6.
|
|
3
|
-
* (c) 2014-
|
|
2
|
+
* Vue.js v2.6.13
|
|
3
|
+
* (c) 2014-2021 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -1700,13 +1700,14 @@ function assertProp (
|
|
|
1700
1700
|
type = [type];
|
|
1701
1701
|
}
|
|
1702
1702
|
for (var i = 0; i < type.length && !valid; i++) {
|
|
1703
|
-
var assertedType = assertType(value, type[i]);
|
|
1703
|
+
var assertedType = assertType(value, type[i], vm);
|
|
1704
1704
|
expectedTypes.push(assertedType.expectedType || '');
|
|
1705
1705
|
valid = assertedType.valid;
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
|
-
|
|
1709
|
+
var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
|
|
1710
|
+
if (!valid && haveExpectedTypes) {
|
|
1710
1711
|
warn(
|
|
1711
1712
|
getInvalidTypeMessage(name, value, expectedTypes),
|
|
1712
1713
|
vm
|
|
@@ -1724,9 +1725,9 @@ function assertProp (
|
|
|
1724
1725
|
}
|
|
1725
1726
|
}
|
|
1726
1727
|
|
|
1727
|
-
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
|
|
1728
|
+
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
|
|
1728
1729
|
|
|
1729
|
-
function assertType (value, type) {
|
|
1730
|
+
function assertType (value, type, vm) {
|
|
1730
1731
|
var valid;
|
|
1731
1732
|
var expectedType = getType(type);
|
|
1732
1733
|
if (simpleCheckRE.test(expectedType)) {
|
|
@@ -1741,7 +1742,12 @@ function assertType (value, type) {
|
|
|
1741
1742
|
} else if (expectedType === 'Array') {
|
|
1742
1743
|
valid = Array.isArray(value);
|
|
1743
1744
|
} else {
|
|
1744
|
-
|
|
1745
|
+
try {
|
|
1746
|
+
valid = value instanceof type;
|
|
1747
|
+
} catch (e) {
|
|
1748
|
+
warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
|
|
1749
|
+
valid = false;
|
|
1750
|
+
}
|
|
1745
1751
|
}
|
|
1746
1752
|
return {
|
|
1747
1753
|
valid: valid,
|
|
@@ -1749,13 +1755,15 @@ function assertType (value, type) {
|
|
|
1749
1755
|
}
|
|
1750
1756
|
}
|
|
1751
1757
|
|
|
1758
|
+
var functionTypeCheckRE = /^\s*function (\w+)/;
|
|
1759
|
+
|
|
1752
1760
|
/**
|
|
1753
1761
|
* Use function string name to check built-in types,
|
|
1754
1762
|
* because a simple equality check will fail when running
|
|
1755
1763
|
* across different vms / iframes.
|
|
1756
1764
|
*/
|
|
1757
1765
|
function getType (fn) {
|
|
1758
|
-
var match = fn && fn.toString().match(
|
|
1766
|
+
var match = fn && fn.toString().match(functionTypeCheckRE);
|
|
1759
1767
|
return match ? match[1] : ''
|
|
1760
1768
|
}
|
|
1761
1769
|
|
|
@@ -1780,18 +1788,19 @@ function getInvalidTypeMessage (name, value, expectedTypes) {
|
|
|
1780
1788
|
" Expected " + (expectedTypes.map(capitalize).join(', '));
|
|
1781
1789
|
var expectedType = expectedTypes[0];
|
|
1782
1790
|
var receivedType = toRawType(value);
|
|
1783
|
-
var expectedValue = styleValue(value, expectedType);
|
|
1784
|
-
var receivedValue = styleValue(value, receivedType);
|
|
1785
1791
|
// check if we need to specify expected value
|
|
1786
|
-
if (
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1792
|
+
if (
|
|
1793
|
+
expectedTypes.length === 1 &&
|
|
1794
|
+
isExplicable(expectedType) &&
|
|
1795
|
+
isExplicable(typeof value) &&
|
|
1796
|
+
!isBoolean(expectedType, receivedType)
|
|
1797
|
+
) {
|
|
1798
|
+
message += " with value " + (styleValue(value, expectedType));
|
|
1790
1799
|
}
|
|
1791
1800
|
message += ", got " + receivedType + " ";
|
|
1792
1801
|
// check if we need to specify received value
|
|
1793
1802
|
if (isExplicable(receivedType)) {
|
|
1794
|
-
message += "with value " +
|
|
1803
|
+
message += "with value " + (styleValue(value, receivedType)) + ".";
|
|
1795
1804
|
}
|
|
1796
1805
|
return message
|
|
1797
1806
|
}
|
|
@@ -1806,9 +1815,9 @@ function styleValue (value, type) {
|
|
|
1806
1815
|
}
|
|
1807
1816
|
}
|
|
1808
1817
|
|
|
1818
|
+
var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
|
|
1809
1819
|
function isExplicable (value) {
|
|
1810
|
-
|
|
1811
|
-
return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
|
|
1820
|
+
return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; })
|
|
1812
1821
|
}
|
|
1813
1822
|
|
|
1814
1823
|
function isBoolean () {
|
|
@@ -2035,7 +2044,7 @@ var initProxy;
|
|
|
2035
2044
|
var allowedGlobals = makeMap(
|
|
2036
2045
|
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
|
2037
2046
|
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
|
2038
|
-
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
|
2047
|
+
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
|
|
2039
2048
|
'require' // for Webpack/Browserify
|
|
2040
2049
|
);
|
|
2041
2050
|
|
|
@@ -2538,6 +2547,12 @@ function isWhitespace (node) {
|
|
|
2538
2547
|
|
|
2539
2548
|
/* */
|
|
2540
2549
|
|
|
2550
|
+
function isAsyncPlaceholder (node) {
|
|
2551
|
+
return node.isComment && node.asyncFactory
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
/* */
|
|
2555
|
+
|
|
2541
2556
|
function normalizeScopedSlots (
|
|
2542
2557
|
slots,
|
|
2543
2558
|
normalSlots,
|
|
@@ -2594,9 +2609,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
|
|
|
2594
2609
|
res = res && typeof res === 'object' && !Array.isArray(res)
|
|
2595
2610
|
? [res] // single vnode
|
|
2596
2611
|
: normalizeChildren(res);
|
|
2612
|
+
var vnode = res && res[0];
|
|
2597
2613
|
return res && (
|
|
2598
|
-
|
|
2599
|
-
(
|
|
2614
|
+
!vnode ||
|
|
2615
|
+
(vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
|
|
2600
2616
|
) ? undefined
|
|
2601
2617
|
: res
|
|
2602
2618
|
};
|
|
@@ -2669,26 +2685,28 @@ function renderList (
|
|
|
2669
2685
|
*/
|
|
2670
2686
|
function renderSlot (
|
|
2671
2687
|
name,
|
|
2672
|
-
|
|
2688
|
+
fallbackRender,
|
|
2673
2689
|
props,
|
|
2674
2690
|
bindObject
|
|
2675
2691
|
) {
|
|
2676
2692
|
var scopedSlotFn = this.$scopedSlots[name];
|
|
2677
2693
|
var nodes;
|
|
2678
|
-
if (scopedSlotFn) {
|
|
2694
|
+
if (scopedSlotFn) {
|
|
2695
|
+
// scoped slot
|
|
2679
2696
|
props = props || {};
|
|
2680
2697
|
if (bindObject) {
|
|
2681
2698
|
if (!isObject(bindObject)) {
|
|
2682
|
-
warn(
|
|
2683
|
-
'slot v-bind without argument expects an Object',
|
|
2684
|
-
this
|
|
2685
|
-
);
|
|
2699
|
+
warn('slot v-bind without argument expects an Object', this);
|
|
2686
2700
|
}
|
|
2687
2701
|
props = extend(extend({}, bindObject), props);
|
|
2688
2702
|
}
|
|
2689
|
-
nodes =
|
|
2703
|
+
nodes =
|
|
2704
|
+
scopedSlotFn(props) ||
|
|
2705
|
+
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
|
|
2690
2706
|
} else {
|
|
2691
|
-
nodes =
|
|
2707
|
+
nodes =
|
|
2708
|
+
this.$slots[name] ||
|
|
2709
|
+
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
|
|
2692
2710
|
}
|
|
2693
2711
|
|
|
2694
2712
|
var target = props && props.slot;
|
|
@@ -2738,6 +2756,7 @@ function checkKeyCodes (
|
|
|
2738
2756
|
} else if (eventKeyName) {
|
|
2739
2757
|
return hyphenate(eventKeyName) !== key
|
|
2740
2758
|
}
|
|
2759
|
+
return eventKeyCode === undefined
|
|
2741
2760
|
}
|
|
2742
2761
|
|
|
2743
2762
|
/* */
|
|
@@ -3269,8 +3288,10 @@ function createComponent (
|
|
|
3269
3288
|
}
|
|
3270
3289
|
|
|
3271
3290
|
function createComponentInstanceForVnode (
|
|
3272
|
-
|
|
3273
|
-
|
|
3291
|
+
// we know it's MountedComponentVNode but flow doesn't
|
|
3292
|
+
vnode,
|
|
3293
|
+
// activeInstance in lifecycle state
|
|
3294
|
+
parent
|
|
3274
3295
|
) {
|
|
3275
3296
|
var options = {
|
|
3276
3297
|
_isComponent: true,
|
|
@@ -3409,7 +3430,7 @@ function _createElement (
|
|
|
3409
3430
|
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
|
|
3410
3431
|
if (config.isReservedTag(tag)) {
|
|
3411
3432
|
// platform built-in elements
|
|
3412
|
-
if (isDef(data) && isDef(data.nativeOn)) {
|
|
3433
|
+
if (isDef(data) && isDef(data.nativeOn) && data.tag !== 'component') {
|
|
3413
3434
|
warn(
|
|
3414
3435
|
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
|
|
3415
3436
|
context
|
|
@@ -3735,12 +3756,6 @@ function resolveAsyncComponent (
|
|
|
3735
3756
|
|
|
3736
3757
|
/* */
|
|
3737
3758
|
|
|
3738
|
-
function isAsyncPlaceholder (node) {
|
|
3739
|
-
return node.isComment && node.asyncFactory
|
|
3740
|
-
}
|
|
3741
|
-
|
|
3742
|
-
/* */
|
|
3743
|
-
|
|
3744
3759
|
function getFirstComponentChild (children) {
|
|
3745
3760
|
if (Array.isArray(children)) {
|
|
3746
3761
|
for (var i = 0; i < children.length; i++) {
|
|
@@ -4107,7 +4122,8 @@ function updateChildComponent (
|
|
|
4107
4122
|
var hasDynamicScopedSlot = !!(
|
|
4108
4123
|
(newScopedSlots && !newScopedSlots.$stable) ||
|
|
4109
4124
|
(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
|
|
4110
|
-
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
|
|
4125
|
+
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
|
|
4126
|
+
(!newScopedSlots && vm.$scopedSlots.$key)
|
|
4111
4127
|
);
|
|
4112
4128
|
|
|
4113
4129
|
// Any static slot children from the parent may have changed during parent's
|
|
@@ -4559,11 +4575,8 @@ Watcher.prototype.run = function run () {
|
|
|
4559
4575
|
var oldValue = this.value;
|
|
4560
4576
|
this.value = value;
|
|
4561
4577
|
if (this.user) {
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
} catch (e) {
|
|
4565
|
-
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
|
|
4566
|
-
}
|
|
4578
|
+
var info = "callback for watcher \"" + (this.expression) + "\"";
|
|
4579
|
+
invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
|
|
4567
4580
|
} else {
|
|
4568
4581
|
this.cb.call(this.vm, value, oldValue);
|
|
4569
4582
|
}
|
|
@@ -4785,6 +4798,8 @@ function initComputed (vm, computed) {
|
|
|
4785
4798
|
warn(("The computed property \"" + key + "\" is already defined in data."), vm);
|
|
4786
4799
|
} else if (vm.$options.props && key in vm.$options.props) {
|
|
4787
4800
|
warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
|
|
4801
|
+
} else if (vm.$options.methods && key in vm.$options.methods) {
|
|
4802
|
+
warn(("The computed property \"" + key + "\" is already defined as a method."), vm);
|
|
4788
4803
|
}
|
|
4789
4804
|
}
|
|
4790
4805
|
}
|
|
@@ -4937,11 +4952,10 @@ function stateMixin (Vue) {
|
|
|
4937
4952
|
options.user = true;
|
|
4938
4953
|
var watcher = new Watcher(vm, expOrFn, cb, options);
|
|
4939
4954
|
if (options.immediate) {
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
}
|
|
4955
|
+
var info = "callback for immediate watcher \"" + (watcher.expression) + "\"";
|
|
4956
|
+
pushTarget();
|
|
4957
|
+
invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
|
|
4958
|
+
popTarget();
|
|
4945
4959
|
}
|
|
4946
4960
|
return function unwatchFn () {
|
|
4947
4961
|
watcher.teardown();
|
|
@@ -5239,6 +5253,8 @@ function initAssetRegisters (Vue) {
|
|
|
5239
5253
|
|
|
5240
5254
|
|
|
5241
5255
|
|
|
5256
|
+
|
|
5257
|
+
|
|
5242
5258
|
function getComponentName (opts) {
|
|
5243
5259
|
return opts && (opts.Ctor.options.name || opts.tag)
|
|
5244
5260
|
}
|
|
@@ -5260,9 +5276,9 @@ function pruneCache (keepAliveInstance, filter) {
|
|
|
5260
5276
|
var keys = keepAliveInstance.keys;
|
|
5261
5277
|
var _vnode = keepAliveInstance._vnode;
|
|
5262
5278
|
for (var key in cache) {
|
|
5263
|
-
var
|
|
5264
|
-
if (
|
|
5265
|
-
var name =
|
|
5279
|
+
var entry = cache[key];
|
|
5280
|
+
if (entry) {
|
|
5281
|
+
var name = entry.name;
|
|
5266
5282
|
if (name && !filter(name)) {
|
|
5267
5283
|
pruneCacheEntry(cache, key, keys, _vnode);
|
|
5268
5284
|
}
|
|
@@ -5276,9 +5292,9 @@ function pruneCacheEntry (
|
|
|
5276
5292
|
keys,
|
|
5277
5293
|
current
|
|
5278
5294
|
) {
|
|
5279
|
-
var
|
|
5280
|
-
if (
|
|
5281
|
-
|
|
5295
|
+
var entry = cache[key];
|
|
5296
|
+
if (entry && (!current || entry.tag !== current.tag)) {
|
|
5297
|
+
entry.componentInstance.$destroy();
|
|
5282
5298
|
}
|
|
5283
5299
|
cache[key] = null;
|
|
5284
5300
|
remove(keys, key);
|
|
@@ -5296,6 +5312,32 @@ var KeepAlive = {
|
|
|
5296
5312
|
max: [String, Number]
|
|
5297
5313
|
},
|
|
5298
5314
|
|
|
5315
|
+
methods: {
|
|
5316
|
+
cacheVNode: function cacheVNode() {
|
|
5317
|
+
var ref = this;
|
|
5318
|
+
var cache = ref.cache;
|
|
5319
|
+
var keys = ref.keys;
|
|
5320
|
+
var vnodeToCache = ref.vnodeToCache;
|
|
5321
|
+
var keyToCache = ref.keyToCache;
|
|
5322
|
+
if (vnodeToCache) {
|
|
5323
|
+
var tag = vnodeToCache.tag;
|
|
5324
|
+
var componentInstance = vnodeToCache.componentInstance;
|
|
5325
|
+
var componentOptions = vnodeToCache.componentOptions;
|
|
5326
|
+
cache[keyToCache] = {
|
|
5327
|
+
name: getComponentName(componentOptions),
|
|
5328
|
+
tag: tag,
|
|
5329
|
+
componentInstance: componentInstance,
|
|
5330
|
+
};
|
|
5331
|
+
keys.push(keyToCache);
|
|
5332
|
+
// prune oldest entry
|
|
5333
|
+
if (this.max && keys.length > parseInt(this.max)) {
|
|
5334
|
+
pruneCacheEntry(cache, keys[0], keys, this._vnode);
|
|
5335
|
+
}
|
|
5336
|
+
this.vnodeToCache = null;
|
|
5337
|
+
}
|
|
5338
|
+
}
|
|
5339
|
+
},
|
|
5340
|
+
|
|
5299
5341
|
created: function created () {
|
|
5300
5342
|
this.cache = Object.create(null);
|
|
5301
5343
|
this.keys = [];
|
|
@@ -5310,6 +5352,7 @@ var KeepAlive = {
|
|
|
5310
5352
|
mounted: function mounted () {
|
|
5311
5353
|
var this$1 = this;
|
|
5312
5354
|
|
|
5355
|
+
this.cacheVNode();
|
|
5313
5356
|
this.$watch('include', function (val) {
|
|
5314
5357
|
pruneCache(this$1, function (name) { return matches(val, name); });
|
|
5315
5358
|
});
|
|
@@ -5318,6 +5361,10 @@ var KeepAlive = {
|
|
|
5318
5361
|
});
|
|
5319
5362
|
},
|
|
5320
5363
|
|
|
5364
|
+
updated: function updated () {
|
|
5365
|
+
this.cacheVNode();
|
|
5366
|
+
},
|
|
5367
|
+
|
|
5321
5368
|
render: function render () {
|
|
5322
5369
|
var slot = this.$slots.default;
|
|
5323
5370
|
var vnode = getFirstComponentChild(slot);
|
|
@@ -5351,12 +5398,9 @@ var KeepAlive = {
|
|
|
5351
5398
|
remove(keys, key);
|
|
5352
5399
|
keys.push(key);
|
|
5353
5400
|
} else {
|
|
5354
|
-
cache
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
if (this.max && keys.length > parseInt(this.max)) {
|
|
5358
|
-
pruneCacheEntry(cache, keys[0], keys, this._vnode);
|
|
5359
|
-
}
|
|
5401
|
+
// delay setting the cache until update
|
|
5402
|
+
this.vnodeToCache = vnode;
|
|
5403
|
+
this.keyToCache = key;
|
|
5360
5404
|
}
|
|
5361
5405
|
|
|
5362
5406
|
vnode.data.keepAlive = true;
|
|
@@ -5439,7 +5483,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
5439
5483
|
value: FunctionalRenderContext
|
|
5440
5484
|
});
|
|
5441
5485
|
|
|
5442
|
-
Vue.version = '2.6.
|
|
5486
|
+
Vue.version = '2.6.13';
|
|
5443
5487
|
|
|
5444
5488
|
/* */
|
|
5445
5489
|
|
|
@@ -5476,7 +5520,7 @@ var isBooleanAttr = makeMap(
|
|
|
5476
5520
|
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
|
5477
5521
|
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
|
5478
5522
|
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
|
5479
|
-
'required,reversed,scoped,seamless,selected,sortable,
|
|
5523
|
+
'required,reversed,scoped,seamless,selected,sortable,' +
|
|
5480
5524
|
'truespeed,typemustmatch,visible'
|
|
5481
5525
|
);
|
|
5482
5526
|
|
|
@@ -5600,7 +5644,7 @@ var isHTMLTag = makeMap(
|
|
|
5600
5644
|
// contain child elements.
|
|
5601
5645
|
var isSVG = makeMap(
|
|
5602
5646
|
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
|
|
5603
|
-
'
|
|
5647
|
+
'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
|
|
5604
5648
|
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
|
|
5605
5649
|
true
|
|
5606
5650
|
);
|
|
@@ -5805,7 +5849,8 @@ var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
|
|
|
5805
5849
|
|
|
5806
5850
|
function sameVnode (a, b) {
|
|
5807
5851
|
return (
|
|
5808
|
-
a.key === b.key &&
|
|
5852
|
+
a.key === b.key &&
|
|
5853
|
+
a.asyncFactory === b.asyncFactory && (
|
|
5809
5854
|
(
|
|
5810
5855
|
a.tag === b.tag &&
|
|
5811
5856
|
a.isComment === b.isComment &&
|
|
@@ -5813,7 +5858,6 @@ function sameVnode (a, b) {
|
|
|
5813
5858
|
sameInputType(a, b)
|
|
5814
5859
|
) || (
|
|
5815
5860
|
isTrue(a.isAsyncPlaceholder) &&
|
|
5816
|
-
a.asyncFactory === b.asyncFactory &&
|
|
5817
5861
|
isUndef(b.asyncFactory.error)
|
|
5818
5862
|
)
|
|
5819
5863
|
)
|
|
@@ -6701,7 +6745,7 @@ function updateAttrs (oldVnode, vnode) {
|
|
|
6701
6745
|
cur = attrs[key];
|
|
6702
6746
|
old = oldAttrs[key];
|
|
6703
6747
|
if (old !== cur) {
|
|
6704
|
-
setAttr(elm, key, cur);
|
|
6748
|
+
setAttr(elm, key, cur, vnode.data.pre);
|
|
6705
6749
|
}
|
|
6706
6750
|
}
|
|
6707
6751
|
// #4391: in IE9, setting type can reset value for input[type=radio]
|
|
@@ -6721,8 +6765,8 @@ function updateAttrs (oldVnode, vnode) {
|
|
|
6721
6765
|
}
|
|
6722
6766
|
}
|
|
6723
6767
|
|
|
6724
|
-
function setAttr (el, key, value) {
|
|
6725
|
-
if (el.tagName.indexOf('-') > -1) {
|
|
6768
|
+
function setAttr (el, key, value, isInPre) {
|
|
6769
|
+
if (isInPre || el.tagName.indexOf('-') > -1) {
|
|
6726
6770
|
baseSetAttr(el, key, value);
|
|
6727
6771
|
} else if (isBooleanAttr(key)) {
|
|
6728
6772
|
// set attribute for blank value
|
|
@@ -9243,7 +9287,7 @@ var isNonPhrasingTag = makeMap(
|
|
|
9243
9287
|
|
|
9244
9288
|
// Regular Expressions for parsing tags and attributes
|
|
9245
9289
|
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
|
9246
|
-
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]
|
|
9290
|
+
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
|
9247
9291
|
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
|
|
9248
9292
|
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
|
|
9249
9293
|
var startTagOpen = new RegExp(("^<" + qnameCapture));
|
|
@@ -9548,7 +9592,7 @@ var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
|
|
|
9548
9592
|
var slotRE = /^v-slot(:|$)|^#/;
|
|
9549
9593
|
|
|
9550
9594
|
var lineBreakRE = /[\r\n]/;
|
|
9551
|
-
var whitespaceRE$1 =
|
|
9595
|
+
var whitespaceRE$1 = /[ \f\t\r\n]+/g;
|
|
9552
9596
|
|
|
9553
9597
|
var invalidAttributeRE = /[\s"'<>\/=]/;
|
|
9554
9598
|
|
|
@@ -9596,8 +9640,12 @@ function parse (
|
|
|
9596
9640
|
platformMustUseProp = options.mustUseProp || no;
|
|
9597
9641
|
platformGetTagNamespace = options.getTagNamespace || no;
|
|
9598
9642
|
var isReservedTag = options.isReservedTag || no;
|
|
9599
|
-
maybeComponent = function (el) { return !!
|
|
9600
|
-
|
|
9643
|
+
maybeComponent = function (el) { return !!(
|
|
9644
|
+
el.component ||
|
|
9645
|
+
el.attrsMap[':is'] ||
|
|
9646
|
+
el.attrsMap['v-bind:is'] ||
|
|
9647
|
+
!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
|
|
9648
|
+
); };
|
|
9601
9649
|
transforms = pluckModuleFunction(options.modules, 'transformNode');
|
|
9602
9650
|
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
|
|
9603
9651
|
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
|
|
@@ -10846,9 +10894,9 @@ function genHandler (handler) {
|
|
|
10846
10894
|
code += genModifierCode;
|
|
10847
10895
|
}
|
|
10848
10896
|
var handlerCode = isMethodPath
|
|
10849
|
-
? ("return " + (handler.value) + "(
|
|
10897
|
+
? ("return " + (handler.value) + ".apply(null, arguments)")
|
|
10850
10898
|
: isFunctionExpression
|
|
10851
|
-
? ("return (" + (handler.value) + ")(
|
|
10899
|
+
? ("return (" + (handler.value) + ").apply(null, arguments)")
|
|
10852
10900
|
: isFunctionInvocation
|
|
10853
10901
|
? ("return " + (handler.value))
|
|
10854
10902
|
: handler.value;
|
|
@@ -10934,7 +10982,8 @@ function generate (
|
|
|
10934
10982
|
options
|
|
10935
10983
|
) {
|
|
10936
10984
|
var state = new CodegenState(options);
|
|
10937
|
-
|
|
10985
|
+
// fix #11483, Root level <script> tags should not be rendered.
|
|
10986
|
+
var code = ast ? (ast.tag === 'script' ? 'null' : genElement(ast, state)) : '_c("div")';
|
|
10938
10987
|
return {
|
|
10939
10988
|
render: ("with(this){return " + code + "}"),
|
|
10940
10989
|
staticRenderFns: state.staticRenderFns
|
|
@@ -11396,7 +11445,7 @@ function genComment (comment) {
|
|
|
11396
11445
|
function genSlot (el, state) {
|
|
11397
11446
|
var slotName = el.slotName || '"default"';
|
|
11398
11447
|
var children = genChildren(el, state);
|
|
11399
|
-
var res = "_t(" + slotName + (children ? ("," + children) : '');
|
|
11448
|
+
var res = "_t(" + slotName + (children ? (",function(){return " + children + "}") : '');
|
|
11400
11449
|
var attrs = el.attrs || el.dynamicAttrs
|
|
11401
11450
|
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
|
|
11402
11451
|
// slot props are camelized
|