11/*!
2- * Vue.js v2.6.10
2+ * Vue.js v2.6.11
33 * (c) 2014-2019 Evan You
44 * Released under the MIT License.
55 */
@@ -1996,7 +1996,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
19961996 isUsingMicroTask = true ;
19971997} else if ( typeof setImmediate !== 'undefined' && isNative ( setImmediate ) ) {
19981998 // Fallback to setImmediate.
1999- // Techinically it leverages the (macro) task queue,
1999+ // Technically it leverages the (macro) task queue,
20002000 // but it is still a better choice than setTimeout.
20012001 timerFunc = ( ) => {
20022002 setImmediate ( flushCallbacks ) ;
@@ -2085,7 +2085,7 @@ let initProxy;
20852085 warn (
20862086 `Property "${ key } " must be accessed with "$data.${ key } " because ` +
20872087 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
2088- 'prevent conflicts with Vue internals' +
2088+ 'prevent conflicts with Vue internals. ' +
20892089 'See: https://vuejs.org/v2/api/#data' ,
20902090 target
20912091 ) ;
@@ -2940,7 +2940,7 @@ function bindDynamicKeys (baseObj, values) {
29402940 if ( typeof key === 'string' && key ) {
29412941 baseObj [ values [ i ] ] = values [ i + 1 ] ;
29422942 } else if ( key !== '' && key !== null ) {
2943- // null is a speical value for explicitly removing a binding
2943+ // null is a special value for explicitly removing a binding
29442944 warn (
29452945 `Invalid value for dynamic directive argument (expected string or null): ${ key } ` ,
29462946 this
@@ -3432,6 +3432,12 @@ function _createElement (
34323432 ns = ( context . $vnode && context . $vnode . ns ) || config . getTagNamespace ( tag ) ;
34333433 if ( config . isReservedTag ( tag ) ) {
34343434 // platform built-in elements
3435+ if ( isDef ( data ) && isDef ( data . nativeOn ) ) {
3436+ warn (
3437+ `The .native modifier for v-on is only valid on components but it was used on <${ tag } >.` ,
3438+ context
3439+ ) ;
3440+ }
34353441 vnode = new VNode (
34363442 config . parsePlatformTagName ( tag ) , data , children ,
34373443 undefined , undefined , context
@@ -3555,7 +3561,7 @@ function renderMixin (Vue) {
35553561 // render self
35563562 let vnode ;
35573563 try {
3558- // There's no need to maintain a stack becaues all render fns are called
3564+ // There's no need to maintain a stack because all render fns are called
35593565 // separately from one another. Nested component's render fns are called
35603566 // when parent component is patched.
35613567 currentRenderingInstance = vm ;
@@ -5464,7 +5470,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
54645470 value : FunctionalRenderContext
54655471} ) ;
54665472
5467- Vue . version = '2.6.10 ' ;
5473+ Vue . version = '2.6.11 ' ;
54685474
54695475/* */
54705476
@@ -6136,7 +6142,7 @@ function createPatchFunction (backend) {
61366142 }
61376143 }
61386144
6139- function removeVnodes ( parentElm , vnodes , startIdx , endIdx ) {
6145+ function removeVnodes ( vnodes , startIdx , endIdx ) {
61406146 for ( ; startIdx <= endIdx ; ++ startIdx ) {
61416147 const ch = vnodes [ startIdx ] ;
61426148 if ( isDef ( ch ) ) {
@@ -6247,7 +6253,7 @@ function createPatchFunction (backend) {
62476253 refElm = isUndef ( newCh [ newEndIdx + 1 ] ) ? null : newCh [ newEndIdx + 1 ] . elm ;
62486254 addVnodes ( parentElm , refElm , newCh , newStartIdx , newEndIdx , insertedVnodeQueue ) ;
62496255 } else if ( newStartIdx > newEndIdx ) {
6250- removeVnodes ( parentElm , oldCh , oldStartIdx , oldEndIdx ) ;
6256+ removeVnodes ( oldCh , oldStartIdx , oldEndIdx ) ;
62516257 }
62526258 }
62536259
@@ -6339,7 +6345,7 @@ function createPatchFunction (backend) {
63396345 if ( isDef ( oldVnode . text ) ) nodeOps . setTextContent ( elm , '' ) ;
63406346 addVnodes ( elm , null , ch , 0 , ch . length - 1 , insertedVnodeQueue ) ;
63416347 } else if ( isDef ( oldCh ) ) {
6342- removeVnodes ( elm , oldCh , 0 , oldCh . length - 1 ) ;
6348+ removeVnodes ( oldCh , 0 , oldCh . length - 1 ) ;
63436349 } else if ( isDef ( oldVnode . text ) ) {
63446350 nodeOps . setTextContent ( elm , '' ) ;
63456351 }
@@ -6566,7 +6572,7 @@ function createPatchFunction (backend) {
65666572
65676573 // destroy old node
65686574 if ( isDef ( parentElm ) ) {
6569- removeVnodes ( parentElm , [ oldVnode ] , 0 , 0 ) ;
6575+ removeVnodes ( [ oldVnode ] , 0 , 0 ) ;
65706576 } else if ( isDef ( oldVnode . tag ) ) {
65716577 invokeDestroyHook ( oldVnode ) ;
65726578 }
@@ -9261,7 +9267,7 @@ const startTagOpen = new RegExp(`^<${qnameCapture}`);
92619267const startTagClose = / ^ \s * ( \/ ? ) > / ;
92629268const endTag = new RegExp ( `^<\\/${ qnameCapture } [^>]*>` ) ;
92639269const doctype = / ^ < ! D O C T Y P E [ ^ > ] + > / i;
9264- // #7298: escape - to avoid being pased as HTML comment when inlined in page
9270+ // #7298: escape - to avoid being passed as HTML comment when inlined in page
92659271const comment = / ^ < ! \- - / ;
92669272const conditionalComment = / ^ < ! \[ / ;
92679273
@@ -9546,7 +9552,7 @@ function parseHTML (html, options) {
95469552/* */
95479553
95489554const onRE = / ^ @ | ^ v - o n : / ;
9549- const dirRE = / ^ v - | ^ @ | ^ : / ;
9555+ const dirRE = / ^ v - | ^ @ | ^ : | ^ # / ;
95509556const forAliasRE = / ( [ \s \S ] * ?) \s + (?: i n | o f ) \s + ( [ \s \S ] * ) / ;
95519557const forIteratorRE = / , ( [ ^ , \} \] ] * ) (?: , ( [ ^ , \} \] ] * ) ) ? $ / ;
95529558const stripParensRE = / ^ \( | \) $ / g;
@@ -10170,7 +10176,7 @@ function processSlotContent (el) {
1017010176 if ( el . parent && ! maybeComponent ( el . parent ) ) {
1017110177 warn$2 (
1017210178 `<template v-slot> can only appear at the root level inside ` +
10173- `the receiving the component` ,
10179+ `the receiving component` ,
1017410180 el
1017510181 ) ;
1017610182 }
@@ -10729,7 +10735,7 @@ function isDirectChildOfTemplateFor (node) {
1072910735
1073010736/* */
1073110737
10732- const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * (?: [ \w $ ] + ) ? \s * \( / ;
10738+ const fnExpRE = / ^ ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n (?: \s + [ \w $ ] + ) ? \s * \( / ;
1073310739const fnInvokeRE = / \( [ ^ ) ] * ?\) ; * $ / ;
1073410740const simplePathRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' ] | \[ " [ ^ " ] * ?" ] | \[ \d + ] | \[ [ A - Z a - z _ $ ] [ \w $ ] * ] ) * $ / ;
1073510741
@@ -11554,6 +11560,8 @@ function checkNode (node, warn) {
1155411560 const range = node . rawAttrsMap [ name ] ;
1155511561 if ( name === 'v-for' ) {
1155611562 checkFor ( node , `v-for="${ value } "` , warn , range ) ;
11563+ } else if ( name === 'v-slot' || name [ 0 ] === '#' ) {
11564+ checkFunctionParameterExpression ( value , `${ name } ="${ value } "` , warn , range ) ;
1155711565 } else if ( onRE . test ( name ) ) {
1155811566 checkEvent ( value , `${ name } ="${ value } "` , warn , range ) ;
1155911567 } else {
@@ -11573,9 +11581,9 @@ function checkNode (node, warn) {
1157311581}
1157411582
1157511583function checkEvent ( exp , text , warn , range ) {
11576- const stipped = exp . replace ( stripStringRE , '' ) ;
11577- const keywordMatch = stipped . match ( unaryOperatorsRE ) ;
11578- if ( keywordMatch && stipped . charAt ( keywordMatch . index - 1 ) !== '$' ) {
11584+ const stripped = exp . replace ( stripStringRE , '' ) ;
11585+ const keywordMatch = stripped . match ( unaryOperatorsRE ) ;
11586+ if ( keywordMatch && stripped . charAt ( keywordMatch . index - 1 ) !== '$' ) {
1157911587 warn (
1158011588 `avoid using JavaScript unary operator as property name: ` +
1158111589 `"${ keywordMatch [ 0 ] } " in expression ${ text . trim ( ) } ` ,
@@ -11630,6 +11638,19 @@ function checkExpression (exp, text, warn, range) {
1163011638 }
1163111639}
1163211640
11641+ function checkFunctionParameterExpression ( exp , text , warn , range ) {
11642+ try {
11643+ new Function ( exp , '' ) ;
11644+ } catch ( e ) {
11645+ warn (
11646+ `invalid function parameter expression: ${ e . message } in\n\n` +
11647+ ` ${ exp } \n\n` +
11648+ ` Raw expression: ${ text . trim ( ) } \n` ,
11649+ range
11650+ ) ;
11651+ }
11652+ }
11653+
1163311654/* */
1163411655
1163511656const range = 2 ;
0 commit comments