|
|
@ -1,6 +1,6 @@ |
|
|
|
/*! |
|
|
|
* Vue.js v2.6.12 |
|
|
|
* (c) 2014-2020 Evan You |
|
|
|
* Vue.js v2.6.13 |
|
|
|
* (c) 2014-2021 Evan You |
|
|
|
* Released under the MIT License. |
|
|
|
*/ |
|
|
|
/* */ |
|
|
@ -1704,13 +1704,14 @@ function assertProp ( |
|
|
|
type = [type]; |
|
|
|
} |
|
|
|
for (var i = 0; i < type.length && !valid; i++) { |
|
|
|
var assertedType = assertType(value, type[i]); |
|
|
|
var assertedType = assertType(value, type[i], vm); |
|
|
|
expectedTypes.push(assertedType.expectedType || ''); |
|
|
|
valid = assertedType.valid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!valid) { |
|
|
|
var haveExpectedTypes = expectedTypes.some(function (t) { return t; }); |
|
|
|
if (!valid && haveExpectedTypes) { |
|
|
|
warn( |
|
|
|
getInvalidTypeMessage(name, value, expectedTypes), |
|
|
|
vm |
|
|
@ -1728,9 +1729,9 @@ function assertProp ( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; |
|
|
|
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/; |
|
|
|
|
|
|
|
function assertType (value, type) { |
|
|
|
function assertType (value, type, vm) { |
|
|
|
var valid; |
|
|
|
var expectedType = getType(type); |
|
|
|
if (simpleCheckRE.test(expectedType)) { |
|
|
@ -1745,7 +1746,12 @@ function assertType (value, type) { |
|
|
|
} else if (expectedType === 'Array') { |
|
|
|
valid = Array.isArray(value); |
|
|
|
} else { |
|
|
|
valid = value instanceof type; |
|
|
|
try { |
|
|
|
valid = value instanceof type; |
|
|
|
} catch (e) { |
|
|
|
warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm); |
|
|
|
valid = false; |
|
|
|
} |
|
|
|
} |
|
|
|
return { |
|
|
|
valid: valid, |
|
|
@ -1753,13 +1759,15 @@ function assertType (value, type) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var functionTypeCheckRE = /^\s*function (\w+)/; |
|
|
|
|
|
|
|
/** |
|
|
|
* Use function string name to check built-in types, |
|
|
|
* because a simple equality check will fail when running |
|
|
|
* across different vms / iframes. |
|
|
|
*/ |
|
|
|
function getType (fn) { |
|
|
|
var match = fn && fn.toString().match(/^\s*function (\w+)/); |
|
|
|
var match = fn && fn.toString().match(functionTypeCheckRE); |
|
|
|
return match ? match[1] : '' |
|
|
|
} |
|
|
|
|
|
|
@ -1784,18 +1792,19 @@ function getInvalidTypeMessage (name, value, expectedTypes) { |
|
|
|
" Expected " + (expectedTypes.map(capitalize).join(', ')); |
|
|
|
var expectedType = expectedTypes[0]; |
|
|
|
var receivedType = toRawType(value); |
|
|
|
var expectedValue = styleValue(value, expectedType); |
|
|
|
var receivedValue = styleValue(value, receivedType); |
|
|
|
// check if we need to specify expected value
|
|
|
|
if (expectedTypes.length === 1 && |
|
|
|
isExplicable(expectedType) && |
|
|
|
!isBoolean(expectedType, receivedType)) { |
|
|
|
message += " with value " + expectedValue; |
|
|
|
if ( |
|
|
|
expectedTypes.length === 1 && |
|
|
|
isExplicable(expectedType) && |
|
|
|
isExplicable(typeof value) && |
|
|
|
!isBoolean(expectedType, receivedType) |
|
|
|
) { |
|
|
|
message += " with value " + (styleValue(value, expectedType)); |
|
|
|
} |
|
|
|
message += ", got " + receivedType + " "; |
|
|
|
// check if we need to specify received value
|
|
|
|
if (isExplicable(receivedType)) { |
|
|
|
message += "with value " + receivedValue + "."; |
|
|
|
message += "with value " + (styleValue(value, receivedType)) + "."; |
|
|
|
} |
|
|
|
return message |
|
|
|
} |
|
|
@ -1810,9 +1819,9 @@ function styleValue (value, type) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var EXPLICABLE_TYPES = ['string', 'number', 'boolean']; |
|
|
|
function isExplicable (value) { |
|
|
|
var explicitTypes = ['string', 'number', 'boolean']; |
|
|
|
return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; }) |
|
|
|
return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; }) |
|
|
|
} |
|
|
|
|
|
|
|
function isBoolean () { |
|
|
@ -2039,7 +2048,7 @@ if (process.env.NODE_ENV !== 'production') { |
|
|
|
var allowedGlobals = makeMap( |
|
|
|
'Infinity,undefined,NaN,isFinite,isNaN,' + |
|
|
|
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + |
|
|
|
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + |
|
|
|
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' + |
|
|
|
'require' // for Webpack/Browserify
|
|
|
|
); |
|
|
|
|
|
|
@ -2544,6 +2553,12 @@ function isWhitespace (node) { |
|
|
|
|
|
|
|
/* */ |
|
|
|
|
|
|
|
function isAsyncPlaceholder (node) { |
|
|
|
return node.isComment && node.asyncFactory |
|
|
|
} |
|
|
|
|
|
|
|
/* */ |
|
|
|
|
|
|
|
function normalizeScopedSlots ( |
|
|
|
slots, |
|
|
|
normalSlots, |
|
|
@ -2600,9 +2615,10 @@ function normalizeScopedSlot(normalSlots, key, fn) { |
|
|
|
res = res && typeof res === 'object' && !Array.isArray(res) |
|
|
|
? [res] // single vnode
|
|
|
|
: normalizeChildren(res); |
|
|
|
var vnode = res && res[0]; |
|
|
|
return res && ( |
|
|
|
res.length === 0 || |
|
|
|
(res.length === 1 && res[0].isComment) // #9658
|
|
|
|
!vnode || |
|
|
|
(vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
|
|
|
|
) ? undefined |
|
|
|
: res |
|
|
|
}; |
|
|
@ -2675,26 +2691,28 @@ function renderList ( |
|
|
|
*/ |
|
|
|
function renderSlot ( |
|
|
|
name, |
|
|
|
fallback, |
|
|
|
fallbackRender, |
|
|
|
props, |
|
|
|
bindObject |
|
|
|
) { |
|
|
|
var scopedSlotFn = this.$scopedSlots[name]; |
|
|
|
var nodes; |
|
|
|
if (scopedSlotFn) { // scoped slot
|
|
|
|
if (scopedSlotFn) { |
|
|
|
// scoped slot
|
|
|
|
props = props || {}; |
|
|
|
if (bindObject) { |
|
|
|
if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) { |
|
|
|
warn( |
|
|
|
'slot v-bind without argument expects an Object', |
|
|
|
this |
|
|
|
); |
|
|
|
warn('slot v-bind without argument expects an Object', this); |
|
|
|
} |
|
|
|
props = extend(extend({}, bindObject), props); |
|
|
|
} |
|
|
|
nodes = scopedSlotFn(props) || fallback; |
|
|
|
nodes = |
|
|
|
scopedSlotFn(props) || |
|
|
|
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender); |
|
|
|
} else { |
|
|
|
nodes = this.$slots[name] || fallback; |
|
|
|
nodes = |
|
|
|
this.$slots[name] || |
|
|
|
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender); |
|
|
|
} |
|
|
|
|
|
|
|
var target = props && props.slot; |
|
|
@ -2744,6 +2762,7 @@ function checkKeyCodes ( |
|
|
|
} else if (eventKeyName) { |
|
|
|
return hyphenate(eventKeyName) !== key |
|
|
|
} |
|
|
|
return eventKeyCode === undefined |
|
|
|
} |
|
|
|
|
|
|
|
/* */ |
|
|
@ -3275,8 +3294,10 @@ function createComponent ( |
|
|
|
} |
|
|
|
|
|
|
|
function createComponentInstanceForVnode ( |
|
|
|
vnode, // we know it's MountedComponentVNode but flow doesn't
|
|
|
|
parent // activeInstance in lifecycle state
|
|
|
|
// we know it's MountedComponentVNode but flow doesn't
|
|
|
|
vnode, |
|
|
|
// activeInstance in lifecycle state
|
|
|
|
parent |
|
|
|
) { |
|
|
|
var options = { |
|
|
|
_isComponent: true, |
|
|
@ -3416,7 +3437,7 @@ function _createElement ( |
|
|
|
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); |
|
|
|
if (config.isReservedTag(tag)) { |
|
|
|
// platform built-in elements
|
|
|
|
if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn)) { |
|
|
|
if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn) && data.tag !== 'component') { |
|
|
|
warn( |
|
|
|
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."), |
|
|
|
context |
|
|
@ -3747,12 +3768,6 @@ function resolveAsyncComponent ( |
|
|
|
|
|
|
|
/* */ |
|
|
|
|
|
|
|
function isAsyncPlaceholder (node) { |
|
|
|
return node.isComment && node.asyncFactory |
|
|
|
} |
|
|
|
|
|
|
|
/* */ |
|
|
|
|
|
|
|
function getFirstComponentChild (children) { |
|
|
|
if (Array.isArray(children)) { |
|
|
|
for (var i = 0; i < children.length; i++) { |
|
|
@ -4119,7 +4134,8 @@ function updateChildComponent ( |
|
|
|
var hasDynamicScopedSlot = !!( |
|
|
|
(newScopedSlots && !newScopedSlots.$stable) || |
|
|
|
(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) || |
|
|
|
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) |
|
|
|
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) || |
|
|
|
(!newScopedSlots && vm.$scopedSlots.$key) |
|
|
|
); |
|
|
|
|
|
|
|
// Any static slot children from the parent may have changed during parent's
|
|
|
@ -4573,11 +4589,8 @@ Watcher.prototype.run = function run () { |
|
|
|
var oldValue = this.value; |
|
|
|
this.value = value; |
|
|
|
if (this.user) { |
|
|
|
try { |
|
|
|
this.cb.call(this.vm, value, oldValue); |
|
|
|
} catch (e) { |
|
|
|
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); |
|
|
|
} |
|
|
|
var info = "callback for watcher \"" + (this.expression) + "\""; |
|
|
|
invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info); |
|
|
|
} else { |
|
|
|
this.cb.call(this.vm, value, oldValue); |
|
|
|
} |
|
|
@ -4801,6 +4814,8 @@ function initComputed (vm, computed) { |
|
|
|
warn(("The computed property \"" + key + "\" is already defined in data."), vm); |
|
|
|
} else if (vm.$options.props && key in vm.$options.props) { |
|
|
|
warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); |
|
|
|
} else if (vm.$options.methods && key in vm.$options.methods) { |
|
|
|
warn(("The computed property \"" + key + "\" is already defined as a method."), vm); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -4954,11 +4969,10 @@ function stateMixin (Vue) { |
|
|
|
options.user = true; |
|
|
|
var watcher = new Watcher(vm, expOrFn, cb, options); |
|
|
|
if (options.immediate) { |
|
|
|
try { |
|
|
|
cb.call(vm, watcher.value); |
|
|
|
} catch (error) { |
|
|
|
handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\"")); |
|
|
|
} |
|
|
|
var info = "callback for immediate watcher \"" + (watcher.expression) + "\""; |
|
|
|
pushTarget(); |
|
|
|
invokeWithErrorHandling(cb, vm, [watcher.value], vm, info); |
|
|
|
popTarget(); |
|
|
|
} |
|
|
|
return function unwatchFn () { |
|
|
|
watcher.teardown(); |
|
|
@ -5259,6 +5273,8 @@ function initAssetRegisters (Vue) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getComponentName (opts) { |
|
|
|
return opts && (opts.Ctor.options.name || opts.tag) |
|
|
|
} |
|
|
@ -5280,9 +5296,9 @@ function pruneCache (keepAliveInstance, filter) { |
|
|
|
var keys = keepAliveInstance.keys; |
|
|
|
var _vnode = keepAliveInstance._vnode; |
|
|
|
for (var key in cache) { |
|
|
|
var cachedNode = cache[key]; |
|
|
|
if (cachedNode) { |
|
|
|
var name = getComponentName(cachedNode.componentOptions); |
|
|
|
var entry = cache[key]; |
|
|
|
if (entry) { |
|
|
|
var name = entry.name; |
|
|
|
if (name && !filter(name)) { |
|
|
|
pruneCacheEntry(cache, key, keys, _vnode); |
|
|
|
} |
|
|
@ -5296,9 +5312,9 @@ function pruneCacheEntry ( |
|
|
|
keys, |
|
|
|
current |
|
|
|
) { |
|
|
|
var cached$$1 = cache[key]; |
|
|
|
if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { |
|
|
|
cached$$1.componentInstance.$destroy(); |
|
|
|
var entry = cache[key]; |
|
|
|
if (entry && (!current || entry.tag !== current.tag)) { |
|
|
|
entry.componentInstance.$destroy(); |
|
|
|
} |
|
|
|
cache[key] = null; |
|
|
|
remove(keys, key); |
|
|
@ -5316,6 +5332,32 @@ var KeepAlive = { |
|
|
|
max: [String, Number] |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
cacheVNode: function cacheVNode() { |
|
|
|
var ref = this; |
|
|
|
var cache = ref.cache; |
|
|
|
var keys = ref.keys; |
|
|
|
var vnodeToCache = ref.vnodeToCache; |
|
|
|
var keyToCache = ref.keyToCache; |
|
|
|
if (vnodeToCache) { |
|
|
|
var tag = vnodeToCache.tag; |
|
|
|
var componentInstance = vnodeToCache.componentInstance; |
|
|
|
var componentOptions = vnodeToCache.componentOptions; |
|
|
|
cache[keyToCache] = { |
|
|
|
name: getComponentName(componentOptions), |
|
|
|
tag: tag, |
|
|
|
componentInstance: componentInstance, |
|
|
|
}; |
|
|
|
keys.push(keyToCache); |
|
|
|
// prune oldest entry
|
|
|
|
if (this.max && keys.length > parseInt(this.max)) { |
|
|
|
pruneCacheEntry(cache, keys[0], keys, this._vnode); |
|
|
|
} |
|
|
|
this.vnodeToCache = null; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
created: function created () { |
|
|
|
this.cache = Object.create(null); |
|
|
|
this.keys = []; |
|
|
@ -5330,6 +5372,7 @@ var KeepAlive = { |
|
|
|
mounted: function mounted () { |
|
|
|
var this$1 = this; |
|
|
|
|
|
|
|
this.cacheVNode(); |
|
|
|
this.$watch('include', function (val) { |
|
|
|
pruneCache(this$1, function (name) { return matches(val, name); }); |
|
|
|
}); |
|
|
@ -5338,6 +5381,10 @@ var KeepAlive = { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
updated: function updated () { |
|
|
|
this.cacheVNode(); |
|
|
|
}, |
|
|
|
|
|
|
|
render: function render () { |
|
|
|
var slot = this.$slots.default; |
|
|
|
var vnode = getFirstComponentChild(slot); |
|
|
@ -5371,12 +5418,9 @@ var KeepAlive = { |
|
|
|
remove(keys, key); |
|
|
|
keys.push(key); |
|
|
|
} else { |
|
|
|
cache[key] = vnode; |
|
|
|
keys.push(key); |
|
|
|
// prune oldest entry
|
|
|
|
if (this.max && keys.length > parseInt(this.max)) { |
|
|
|
pruneCacheEntry(cache, keys[0], keys, this._vnode); |
|
|
|
} |
|
|
|
// delay setting the cache until update
|
|
|
|
this.vnodeToCache = vnode; |
|
|
|
this.keyToCache = key; |
|
|
|
} |
|
|
|
|
|
|
|
vnode.data.keepAlive = true; |
|
|
@ -5459,7 +5503,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', { |
|
|
|
value: FunctionalRenderContext |
|
|
|
}); |
|
|
|
|
|
|
|
Vue.version = '2.6.12'; |
|
|
|
Vue.version = '2.6.13'; |
|
|
|
|
|
|
|
/* */ |
|
|
|
|
|
|
@ -5496,7 +5540,7 @@ var isBooleanAttr = makeMap( |
|
|
|
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + |
|
|
|
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' + |
|
|
|
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + |
|
|
|
'required,reversed,scoped,seamless,selected,sortable,translate,' + |
|
|
|
'required,reversed,scoped,seamless,selected,sortable,' + |
|
|
|
'truespeed,typemustmatch,visible' |
|
|
|
); |
|
|
|
|
|
|
@ -5620,7 +5664,7 @@ var isHTMLTag = makeMap( |
|
|
|
// contain child elements.
|
|
|
|
var isSVG = makeMap( |
|
|
|
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' + |
|
|
|
'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + |
|
|
|
'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + |
|
|
|
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', |
|
|
|
true |
|
|
|
); |
|
|
@ -5825,7 +5869,8 @@ var hooks = ['create', 'activate', 'update', 'remove', 'destroy']; |
|
|
|
|
|
|
|
function sameVnode (a, b) { |
|
|
|
return ( |
|
|
|
a.key === b.key && ( |
|
|
|
a.key === b.key && |
|
|
|
a.asyncFactory === b.asyncFactory && ( |
|
|
|
( |
|
|
|
a.tag === b.tag && |
|
|
|
a.isComment === b.isComment && |
|
|
@ -5833,7 +5878,6 @@ function sameVnode (a, b) { |
|
|
|
sameInputType(a, b) |
|
|
|
) || ( |
|
|
|
isTrue(a.isAsyncPlaceholder) && |
|
|
|
a.asyncFactory === b.asyncFactory && |
|
|
|
isUndef(b.asyncFactory.error) |
|
|
|
) |
|
|
|
) |
|
|
@ -6723,7 +6767,7 @@ function updateAttrs (oldVnode, vnode) { |
|
|
|
cur = attrs[key]; |
|
|
|
old = oldAttrs[key]; |
|
|
|
if (old !== cur) { |
|
|
|
setAttr(elm, key, cur); |
|
|
|
setAttr(elm, key, cur, vnode.data.pre); |
|
|
|
} |
|
|
|
} |
|
|
|
// #4391: in IE9, setting type can reset value for input[type=radio]
|
|
|
@ -6743,8 +6787,8 @@ function updateAttrs (oldVnode, vnode) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function setAttr (el, key, value) { |
|
|
|
if (el.tagName.indexOf('-') > -1) { |
|
|
|
function setAttr (el, key, value, isInPre) { |
|
|
|
if (isInPre || el.tagName.indexOf('-') > -1) { |
|
|
|
baseSetAttr(el, key, value); |
|
|
|
} else if (isBooleanAttr(key)) { |
|
|
|
// set attribute for blank value
|
|
|
@ -9271,7 +9315,7 @@ var isNonPhrasingTag = makeMap( |
|
|
|
|
|
|
|
// Regular Expressions for parsing tags and attributes
|
|
|
|
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; |
|
|
|
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; |
|
|
|
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; |
|
|
|
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*"; |
|
|
|
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; |
|
|
|
var startTagOpen = new RegExp(("^<" + qnameCapture)); |
|
|
@ -9577,7 +9621,7 @@ var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g; |
|
|
|
var slotRE = /^v-slot(:|$)|^#/; |
|
|
|
|
|
|
|
var lineBreakRE = /[\r\n]/; |
|
|
|
var whitespaceRE$1 = /\s+/g; |
|
|
|
var whitespaceRE$1 = /[ \f\t\r\n]+/g; |
|
|
|
|
|
|
|
var invalidAttributeRE = /[\s"'<>\/=]/; |
|
|
|
|
|
|
@ -9625,8 +9669,12 @@ function parse ( |
|
|
|
platformMustUseProp = options.mustUseProp || no; |
|
|
|
platformGetTagNamespace = options.getTagNamespace || no; |
|
|
|
var isReservedTag = options.isReservedTag || no; |
|
|
|
maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); }; |
|
|
|
|
|
|
|
maybeComponent = function (el) { return !!( |
|
|
|
el.component || |
|
|
|
el.attrsMap[':is'] || |
|
|
|
el.attrsMap['v-bind:is'] || |
|
|
|
!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)) |
|
|
|
); }; |
|
|
|
transforms = pluckModuleFunction(options.modules, 'transformNode'); |
|
|
|
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode'); |
|
|
|
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode'); |
|
|
@ -10877,9 +10925,9 @@ function genHandler (handler) { |
|
|
|
code += genModifierCode; |
|
|
|
} |
|
|
|
var handlerCode = isMethodPath |
|
|
|
? ("return " + (handler.value) + "($event)") |
|
|
|
? ("return " + (handler.value) + ".apply(null, arguments)") |
|
|
|
: isFunctionExpression |
|
|
|
? ("return (" + (handler.value) + ")($event)") |
|
|
|
? ("return (" + (handler.value) + ").apply(null, arguments)") |
|
|
|
: isFunctionInvocation |
|
|
|
? ("return " + (handler.value)) |
|
|
|
: handler.value; |
|
|
@ -10965,7 +11013,8 @@ function generate ( |
|
|
|
options |
|
|
|
) { |
|
|
|
var state = new CodegenState(options); |
|
|
|
var code = ast ? genElement(ast, state) : '_c("div")'; |
|
|
|
// fix #11483, Root level <script> tags should not be rendered.
|
|
|
|
var code = ast ? (ast.tag === 'script' ? 'null' : genElement(ast, state)) : '_c("div")'; |
|
|
|
return { |
|
|
|
render: ("with(this){return " + code + "}"), |
|
|
|
staticRenderFns: state.staticRenderFns |
|
|
@ -11430,7 +11479,7 @@ function genComment (comment) { |
|
|
|
function genSlot (el, state) { |
|
|
|
var slotName = el.slotName || '"default"'; |
|
|
|
var children = genChildren(el, state); |
|
|
|
var res = "_t(" + slotName + (children ? ("," + children) : ''); |
|
|
|
var res = "_t(" + slotName + (children ? (",function(){return " + children + "}") : ''); |
|
|
|
var attrs = el.attrs || el.dynamicAttrs |
|
|
|
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({ |
|
|
|
// slot props are camelized
|
|
|
|