vue 2.5.15 → 2.5.16
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/dist/vue.common.js +59 -52
- package/dist/vue.esm.js +59 -52
- package/dist/vue.js +59 -52
- package/dist/vue.min.js +2 -2
- package/dist/vue.runtime.common.js +52 -46
- package/dist/vue.runtime.esm.js +52 -46
- package/dist/vue.runtime.js +52 -46
- package/dist/vue.runtime.min.js +2 -2
- package/package.json +1 -1
- package/src/compiler/codegen/events.js +5 -4
- package/src/compiler/parser/index.js +1 -1
- package/src/core/components/keep-alive.js +5 -5
- package/src/core/observer/index.js +6 -6
- package/src/core/vdom/create-component.js +6 -17
- package/src/core/vdom/create-functional-component.js +33 -15
- package/src/platforms/web/compiler/modules/model.js +1 -1
- package/src/platforms/web/server/directives/show.js +5 -1
- package/src/server/render-context.js +11 -1
- package/src/server/render.js +20 -3
package/dist/vue.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.5.
|
|
2
|
+
* Vue.js v2.5.16
|
|
3
3
|
* (c) 2014-2018 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1025,10 +1025,9 @@ function defineReactive (
|
|
|
1025
1025
|
*/
|
|
1026
1026
|
function set (target, key, val) {
|
|
1027
1027
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1028
|
-
|
|
1029
|
-
!isObject(target)
|
|
1028
|
+
(isUndef(target) || isPrimitive(target))
|
|
1030
1029
|
) {
|
|
1031
|
-
warn(("Cannot set reactive property on
|
|
1030
|
+
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1032
1031
|
}
|
|
1033
1032
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1034
1033
|
target.length = Math.max(target.length, key);
|
|
@@ -1061,10 +1060,9 @@ function set (target, key, val) {
|
|
|
1061
1060
|
*/
|
|
1062
1061
|
function del (target, key) {
|
|
1063
1062
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1064
|
-
|
|
1065
|
-
!isObject(target)
|
|
1063
|
+
(isUndef(target) || isPrimitive(target))
|
|
1066
1064
|
) {
|
|
1067
|
-
warn(("Cannot delete reactive property on
|
|
1065
|
+
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1068
1066
|
}
|
|
1069
1067
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1070
1068
|
target.splice(key, 1);
|
|
@@ -3983,6 +3981,24 @@ function FunctionalRenderContext (
|
|
|
3983
3981
|
Ctor
|
|
3984
3982
|
) {
|
|
3985
3983
|
var options = Ctor.options;
|
|
3984
|
+
// ensure the createElement function in functional components
|
|
3985
|
+
// gets a unique context - this is necessary for correct named slot check
|
|
3986
|
+
var contextVm;
|
|
3987
|
+
if (hasOwn(parent, '_uid')) {
|
|
3988
|
+
contextVm = Object.create(parent);
|
|
3989
|
+
// $flow-disable-line
|
|
3990
|
+
contextVm._original = parent;
|
|
3991
|
+
} else {
|
|
3992
|
+
// the context vm passed in is a functional context as well.
|
|
3993
|
+
// in this case we want to make sure we are able to get a hold to the
|
|
3994
|
+
// real context instance.
|
|
3995
|
+
contextVm = parent;
|
|
3996
|
+
// $flow-disable-line
|
|
3997
|
+
parent = parent._original;
|
|
3998
|
+
}
|
|
3999
|
+
var isCompiled = isTrue(options._compiled);
|
|
4000
|
+
var needNormalization = !isCompiled;
|
|
4001
|
+
|
|
3986
4002
|
this.data = data;
|
|
3987
4003
|
this.props = props;
|
|
3988
4004
|
this.children = children;
|
|
@@ -3991,12 +4007,6 @@ function FunctionalRenderContext (
|
|
|
3991
4007
|
this.injections = resolveInject(options.inject, parent);
|
|
3992
4008
|
this.slots = function () { return resolveSlots(children, parent); };
|
|
3993
4009
|
|
|
3994
|
-
// ensure the createElement function in functional components
|
|
3995
|
-
// gets a unique context - this is necessary for correct named slot check
|
|
3996
|
-
var contextVm = Object.create(parent);
|
|
3997
|
-
var isCompiled = isTrue(options._compiled);
|
|
3998
|
-
var needNormalization = !isCompiled;
|
|
3999
|
-
|
|
4000
4010
|
// support for compiled functional template
|
|
4001
4011
|
if (isCompiled) {
|
|
4002
4012
|
// exposing $options for renderStatic()
|
|
@@ -4052,23 +4062,28 @@ function createFunctionalComponent (
|
|
|
4052
4062
|
var vnode = options.render.call(null, renderContext._c, renderContext);
|
|
4053
4063
|
|
|
4054
4064
|
if (vnode instanceof VNode) {
|
|
4055
|
-
|
|
4056
|
-
return vnode
|
|
4065
|
+
return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options)
|
|
4057
4066
|
} else if (Array.isArray(vnode)) {
|
|
4058
4067
|
var vnodes = normalizeChildren(vnode) || [];
|
|
4068
|
+
var res = new Array(vnodes.length);
|
|
4059
4069
|
for (var i = 0; i < vnodes.length; i++) {
|
|
4060
|
-
|
|
4070
|
+
res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options);
|
|
4061
4071
|
}
|
|
4062
|
-
return
|
|
4072
|
+
return res
|
|
4063
4073
|
}
|
|
4064
4074
|
}
|
|
4065
4075
|
|
|
4066
|
-
function
|
|
4067
|
-
|
|
4068
|
-
|
|
4076
|
+
function cloneAndMarkFunctionalResult (vnode, data, contextVm, options) {
|
|
4077
|
+
// #7817 clone node before setting fnContext, otherwise if the node is reused
|
|
4078
|
+
// (e.g. it was from a cached normal slot) the fnContext causes named slots
|
|
4079
|
+
// that should not be matched to match.
|
|
4080
|
+
var clone = cloneVNode(vnode);
|
|
4081
|
+
clone.fnContext = contextVm;
|
|
4082
|
+
clone.fnOptions = options;
|
|
4069
4083
|
if (data.slot) {
|
|
4070
|
-
(
|
|
4084
|
+
(clone.data || (clone.data = {})).slot = data.slot;
|
|
4071
4085
|
}
|
|
4086
|
+
return clone
|
|
4072
4087
|
}
|
|
4073
4088
|
|
|
4074
4089
|
function mergeProps (to, from) {
|
|
@@ -4098,7 +4113,7 @@ function mergeProps (to, from) {
|
|
|
4098
4113
|
|
|
4099
4114
|
/* */
|
|
4100
4115
|
|
|
4101
|
-
// hooks to be invoked on component VNodes during patch
|
|
4116
|
+
// inline hooks to be invoked on component VNodes during patch
|
|
4102
4117
|
var componentVNodeHooks = {
|
|
4103
4118
|
init: function init (
|
|
4104
4119
|
vnode,
|
|
@@ -4256,8 +4271,8 @@ function createComponent (
|
|
|
4256
4271
|
}
|
|
4257
4272
|
}
|
|
4258
4273
|
|
|
4259
|
-
//
|
|
4260
|
-
|
|
4274
|
+
// install component management hooks onto the placeholder node
|
|
4275
|
+
installComponentHooks(data);
|
|
4261
4276
|
|
|
4262
4277
|
// return a placeholder vnode
|
|
4263
4278
|
var name = Ctor.options.name || tag;
|
|
@@ -4297,22 +4312,11 @@ function createComponentInstanceForVnode (
|
|
|
4297
4312
|
return new vnode.componentOptions.Ctor(options)
|
|
4298
4313
|
}
|
|
4299
4314
|
|
|
4300
|
-
function
|
|
4301
|
-
|
|
4302
|
-
data.hook = {};
|
|
4303
|
-
}
|
|
4315
|
+
function installComponentHooks (data) {
|
|
4316
|
+
var hooks = data.hook || (data.hook = {});
|
|
4304
4317
|
for (var i = 0; i < hooksToMerge.length; i++) {
|
|
4305
4318
|
var key = hooksToMerge[i];
|
|
4306
|
-
|
|
4307
|
-
var ours = componentVNodeHooks[key];
|
|
4308
|
-
data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
|
|
4309
|
-
}
|
|
4310
|
-
}
|
|
4311
|
-
|
|
4312
|
-
function mergeHook$1 (one, two) {
|
|
4313
|
-
return function (a, b, c, d) {
|
|
4314
|
-
one(a, b, c, d);
|
|
4315
|
-
two(a, b, c, d);
|
|
4319
|
+
hooks[key] = componentVNodeHooks[key];
|
|
4316
4320
|
}
|
|
4317
4321
|
}
|
|
4318
4322
|
|
|
@@ -4960,13 +4964,15 @@ var KeepAlive = {
|
|
|
4960
4964
|
}
|
|
4961
4965
|
},
|
|
4962
4966
|
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4967
|
+
mounted: function mounted () {
|
|
4968
|
+
var this$1 = this;
|
|
4969
|
+
|
|
4970
|
+
this.$watch('include', function (val) {
|
|
4971
|
+
pruneCache(this$1, function (name) { return matches(val, name); });
|
|
4972
|
+
});
|
|
4973
|
+
this.$watch('exclude', function (val) {
|
|
4974
|
+
pruneCache(this$1, function (name) { return !matches(val, name); });
|
|
4975
|
+
});
|
|
4970
4976
|
},
|
|
4971
4977
|
|
|
4972
4978
|
render: function render () {
|
|
@@ -5084,7 +5090,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
5084
5090
|
value: FunctionalRenderContext
|
|
5085
5091
|
});
|
|
5086
5092
|
|
|
5087
|
-
Vue.version = '2.5.
|
|
5093
|
+
Vue.version = '2.5.16';
|
|
5088
5094
|
|
|
5089
5095
|
/* */
|
|
5090
5096
|
|
|
@@ -9049,7 +9055,7 @@ function parseHTML (html, options) {
|
|
|
9049
9055
|
|
|
9050
9056
|
var onRE = /^@|^v-on:/;
|
|
9051
9057
|
var dirRE = /^v-|^@|^:/;
|
|
9052
|
-
var forAliasRE = /(
|
|
9058
|
+
var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/;
|
|
9053
9059
|
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
9054
9060
|
var stripParensRE = /^\(|\)$/g;
|
|
9055
9061
|
|
|
@@ -9719,7 +9725,7 @@ function preTransformNode (el, options) {
|
|
|
9719
9725
|
if (map[':type'] || map['v-bind:type']) {
|
|
9720
9726
|
typeBinding = getBindingAttr(el, 'type');
|
|
9721
9727
|
}
|
|
9722
|
-
if (!typeBinding && map['v-bind']) {
|
|
9728
|
+
if (!map.type && !typeBinding && map['v-bind']) {
|
|
9723
9729
|
typeBinding = "(" + (map['v-bind']) + ").type";
|
|
9724
9730
|
}
|
|
9725
9731
|
|
|
@@ -9972,10 +9978,11 @@ var keyNames = {
|
|
|
9972
9978
|
tab: 'Tab',
|
|
9973
9979
|
enter: 'Enter',
|
|
9974
9980
|
space: ' ',
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9981
|
+
// #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
|
|
9982
|
+
up: ['Up', 'ArrowUp'],
|
|
9983
|
+
left: ['Left', 'ArrowLeft'],
|
|
9984
|
+
right: ['Right', 'ArrowRight'],
|
|
9985
|
+
down: ['Down', 'ArrowDown'],
|
|
9979
9986
|
'delete': ['Backspace', 'Delete']
|
|
9980
9987
|
};
|
|
9981
9988
|
|
package/dist/vue.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.5.
|
|
2
|
+
* Vue.js v2.5.16
|
|
3
3
|
* (c) 2014-2018 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1023,10 +1023,9 @@ function defineReactive (
|
|
|
1023
1023
|
*/
|
|
1024
1024
|
function set (target, key, val) {
|
|
1025
1025
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1026
|
-
|
|
1027
|
-
!isObject(target)
|
|
1026
|
+
(isUndef(target) || isPrimitive(target))
|
|
1028
1027
|
) {
|
|
1029
|
-
warn(("Cannot set reactive property on
|
|
1028
|
+
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1030
1029
|
}
|
|
1031
1030
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1032
1031
|
target.length = Math.max(target.length, key);
|
|
@@ -1059,10 +1058,9 @@ function set (target, key, val) {
|
|
|
1059
1058
|
*/
|
|
1060
1059
|
function del (target, key) {
|
|
1061
1060
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1062
|
-
|
|
1063
|
-
!isObject(target)
|
|
1061
|
+
(isUndef(target) || isPrimitive(target))
|
|
1064
1062
|
) {
|
|
1065
|
-
warn(("Cannot delete reactive property on
|
|
1063
|
+
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1066
1064
|
}
|
|
1067
1065
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1068
1066
|
target.splice(key, 1);
|
|
@@ -3981,6 +3979,24 @@ function FunctionalRenderContext (
|
|
|
3981
3979
|
Ctor
|
|
3982
3980
|
) {
|
|
3983
3981
|
var options = Ctor.options;
|
|
3982
|
+
// ensure the createElement function in functional components
|
|
3983
|
+
// gets a unique context - this is necessary for correct named slot check
|
|
3984
|
+
var contextVm;
|
|
3985
|
+
if (hasOwn(parent, '_uid')) {
|
|
3986
|
+
contextVm = Object.create(parent);
|
|
3987
|
+
// $flow-disable-line
|
|
3988
|
+
contextVm._original = parent;
|
|
3989
|
+
} else {
|
|
3990
|
+
// the context vm passed in is a functional context as well.
|
|
3991
|
+
// in this case we want to make sure we are able to get a hold to the
|
|
3992
|
+
// real context instance.
|
|
3993
|
+
contextVm = parent;
|
|
3994
|
+
// $flow-disable-line
|
|
3995
|
+
parent = parent._original;
|
|
3996
|
+
}
|
|
3997
|
+
var isCompiled = isTrue(options._compiled);
|
|
3998
|
+
var needNormalization = !isCompiled;
|
|
3999
|
+
|
|
3984
4000
|
this.data = data;
|
|
3985
4001
|
this.props = props;
|
|
3986
4002
|
this.children = children;
|
|
@@ -3989,12 +4005,6 @@ function FunctionalRenderContext (
|
|
|
3989
4005
|
this.injections = resolveInject(options.inject, parent);
|
|
3990
4006
|
this.slots = function () { return resolveSlots(children, parent); };
|
|
3991
4007
|
|
|
3992
|
-
// ensure the createElement function in functional components
|
|
3993
|
-
// gets a unique context - this is necessary for correct named slot check
|
|
3994
|
-
var contextVm = Object.create(parent);
|
|
3995
|
-
var isCompiled = isTrue(options._compiled);
|
|
3996
|
-
var needNormalization = !isCompiled;
|
|
3997
|
-
|
|
3998
4008
|
// support for compiled functional template
|
|
3999
4009
|
if (isCompiled) {
|
|
4000
4010
|
// exposing $options for renderStatic()
|
|
@@ -4050,23 +4060,28 @@ function createFunctionalComponent (
|
|
|
4050
4060
|
var vnode = options.render.call(null, renderContext._c, renderContext);
|
|
4051
4061
|
|
|
4052
4062
|
if (vnode instanceof VNode) {
|
|
4053
|
-
|
|
4054
|
-
return vnode
|
|
4063
|
+
return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options)
|
|
4055
4064
|
} else if (Array.isArray(vnode)) {
|
|
4056
4065
|
var vnodes = normalizeChildren(vnode) || [];
|
|
4066
|
+
var res = new Array(vnodes.length);
|
|
4057
4067
|
for (var i = 0; i < vnodes.length; i++) {
|
|
4058
|
-
|
|
4068
|
+
res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options);
|
|
4059
4069
|
}
|
|
4060
|
-
return
|
|
4070
|
+
return res
|
|
4061
4071
|
}
|
|
4062
4072
|
}
|
|
4063
4073
|
|
|
4064
|
-
function
|
|
4065
|
-
|
|
4066
|
-
|
|
4074
|
+
function cloneAndMarkFunctionalResult (vnode, data, contextVm, options) {
|
|
4075
|
+
// #7817 clone node before setting fnContext, otherwise if the node is reused
|
|
4076
|
+
// (e.g. it was from a cached normal slot) the fnContext causes named slots
|
|
4077
|
+
// that should not be matched to match.
|
|
4078
|
+
var clone = cloneVNode(vnode);
|
|
4079
|
+
clone.fnContext = contextVm;
|
|
4080
|
+
clone.fnOptions = options;
|
|
4067
4081
|
if (data.slot) {
|
|
4068
|
-
(
|
|
4082
|
+
(clone.data || (clone.data = {})).slot = data.slot;
|
|
4069
4083
|
}
|
|
4084
|
+
return clone
|
|
4070
4085
|
}
|
|
4071
4086
|
|
|
4072
4087
|
function mergeProps (to, from) {
|
|
@@ -4096,7 +4111,7 @@ function mergeProps (to, from) {
|
|
|
4096
4111
|
|
|
4097
4112
|
/* */
|
|
4098
4113
|
|
|
4099
|
-
// hooks to be invoked on component VNodes during patch
|
|
4114
|
+
// inline hooks to be invoked on component VNodes during patch
|
|
4100
4115
|
var componentVNodeHooks = {
|
|
4101
4116
|
init: function init (
|
|
4102
4117
|
vnode,
|
|
@@ -4254,8 +4269,8 @@ function createComponent (
|
|
|
4254
4269
|
}
|
|
4255
4270
|
}
|
|
4256
4271
|
|
|
4257
|
-
//
|
|
4258
|
-
|
|
4272
|
+
// install component management hooks onto the placeholder node
|
|
4273
|
+
installComponentHooks(data);
|
|
4259
4274
|
|
|
4260
4275
|
// return a placeholder vnode
|
|
4261
4276
|
var name = Ctor.options.name || tag;
|
|
@@ -4295,22 +4310,11 @@ function createComponentInstanceForVnode (
|
|
|
4295
4310
|
return new vnode.componentOptions.Ctor(options)
|
|
4296
4311
|
}
|
|
4297
4312
|
|
|
4298
|
-
function
|
|
4299
|
-
|
|
4300
|
-
data.hook = {};
|
|
4301
|
-
}
|
|
4313
|
+
function installComponentHooks (data) {
|
|
4314
|
+
var hooks = data.hook || (data.hook = {});
|
|
4302
4315
|
for (var i = 0; i < hooksToMerge.length; i++) {
|
|
4303
4316
|
var key = hooksToMerge[i];
|
|
4304
|
-
|
|
4305
|
-
var ours = componentVNodeHooks[key];
|
|
4306
|
-
data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
|
|
4307
|
-
}
|
|
4308
|
-
}
|
|
4309
|
-
|
|
4310
|
-
function mergeHook$1 (one, two) {
|
|
4311
|
-
return function (a, b, c, d) {
|
|
4312
|
-
one(a, b, c, d);
|
|
4313
|
-
two(a, b, c, d);
|
|
4317
|
+
hooks[key] = componentVNodeHooks[key];
|
|
4314
4318
|
}
|
|
4315
4319
|
}
|
|
4316
4320
|
|
|
@@ -4958,13 +4962,15 @@ var KeepAlive = {
|
|
|
4958
4962
|
}
|
|
4959
4963
|
},
|
|
4960
4964
|
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4965
|
+
mounted: function mounted () {
|
|
4966
|
+
var this$1 = this;
|
|
4967
|
+
|
|
4968
|
+
this.$watch('include', function (val) {
|
|
4969
|
+
pruneCache(this$1, function (name) { return matches(val, name); });
|
|
4970
|
+
});
|
|
4971
|
+
this.$watch('exclude', function (val) {
|
|
4972
|
+
pruneCache(this$1, function (name) { return !matches(val, name); });
|
|
4973
|
+
});
|
|
4968
4974
|
},
|
|
4969
4975
|
|
|
4970
4976
|
render: function render () {
|
|
@@ -5082,7 +5088,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
5082
5088
|
value: FunctionalRenderContext
|
|
5083
5089
|
});
|
|
5084
5090
|
|
|
5085
|
-
Vue.version = '2.5.
|
|
5091
|
+
Vue.version = '2.5.16';
|
|
5086
5092
|
|
|
5087
5093
|
/* */
|
|
5088
5094
|
|
|
@@ -9047,7 +9053,7 @@ function parseHTML (html, options) {
|
|
|
9047
9053
|
|
|
9048
9054
|
var onRE = /^@|^v-on:/;
|
|
9049
9055
|
var dirRE = /^v-|^@|^:/;
|
|
9050
|
-
var forAliasRE = /(
|
|
9056
|
+
var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/;
|
|
9051
9057
|
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
9052
9058
|
var stripParensRE = /^\(|\)$/g;
|
|
9053
9059
|
|
|
@@ -9717,7 +9723,7 @@ function preTransformNode (el, options) {
|
|
|
9717
9723
|
if (map[':type'] || map['v-bind:type']) {
|
|
9718
9724
|
typeBinding = getBindingAttr(el, 'type');
|
|
9719
9725
|
}
|
|
9720
|
-
if (!typeBinding && map['v-bind']) {
|
|
9726
|
+
if (!map.type && !typeBinding && map['v-bind']) {
|
|
9721
9727
|
typeBinding = "(" + (map['v-bind']) + ").type";
|
|
9722
9728
|
}
|
|
9723
9729
|
|
|
@@ -9970,10 +9976,11 @@ var keyNames = {
|
|
|
9970
9976
|
tab: 'Tab',
|
|
9971
9977
|
enter: 'Enter',
|
|
9972
9978
|
space: ' ',
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9979
|
+
// #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
|
|
9980
|
+
up: ['Up', 'ArrowUp'],
|
|
9981
|
+
left: ['Left', 'ArrowLeft'],
|
|
9982
|
+
right: ['Right', 'ArrowRight'],
|
|
9983
|
+
down: ['Down', 'ArrowDown'],
|
|
9977
9984
|
'delete': ['Backspace', 'Delete']
|
|
9978
9985
|
};
|
|
9979
9986
|
|
package/dist/vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.5.
|
|
2
|
+
* Vue.js v2.5.16
|
|
3
3
|
* (c) 2014-2018 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1029,10 +1029,9 @@ function defineReactive (
|
|
|
1029
1029
|
*/
|
|
1030
1030
|
function set (target, key, val) {
|
|
1031
1031
|
if ("development" !== 'production' &&
|
|
1032
|
-
|
|
1033
|
-
!isObject(target)
|
|
1032
|
+
(isUndef(target) || isPrimitive(target))
|
|
1034
1033
|
) {
|
|
1035
|
-
warn(("Cannot set reactive property on
|
|
1034
|
+
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1036
1035
|
}
|
|
1037
1036
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1038
1037
|
target.length = Math.max(target.length, key);
|
|
@@ -1065,10 +1064,9 @@ function set (target, key, val) {
|
|
|
1065
1064
|
*/
|
|
1066
1065
|
function del (target, key) {
|
|
1067
1066
|
if ("development" !== 'production' &&
|
|
1068
|
-
|
|
1069
|
-
!isObject(target)
|
|
1067
|
+
(isUndef(target) || isPrimitive(target))
|
|
1070
1068
|
) {
|
|
1071
|
-
warn(("Cannot delete reactive property on
|
|
1069
|
+
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
|
1072
1070
|
}
|
|
1073
1071
|
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
|
1074
1072
|
target.splice(key, 1);
|
|
@@ -3975,6 +3973,24 @@ function FunctionalRenderContext (
|
|
|
3975
3973
|
Ctor
|
|
3976
3974
|
) {
|
|
3977
3975
|
var options = Ctor.options;
|
|
3976
|
+
// ensure the createElement function in functional components
|
|
3977
|
+
// gets a unique context - this is necessary for correct named slot check
|
|
3978
|
+
var contextVm;
|
|
3979
|
+
if (hasOwn(parent, '_uid')) {
|
|
3980
|
+
contextVm = Object.create(parent);
|
|
3981
|
+
// $flow-disable-line
|
|
3982
|
+
contextVm._original = parent;
|
|
3983
|
+
} else {
|
|
3984
|
+
// the context vm passed in is a functional context as well.
|
|
3985
|
+
// in this case we want to make sure we are able to get a hold to the
|
|
3986
|
+
// real context instance.
|
|
3987
|
+
contextVm = parent;
|
|
3988
|
+
// $flow-disable-line
|
|
3989
|
+
parent = parent._original;
|
|
3990
|
+
}
|
|
3991
|
+
var isCompiled = isTrue(options._compiled);
|
|
3992
|
+
var needNormalization = !isCompiled;
|
|
3993
|
+
|
|
3978
3994
|
this.data = data;
|
|
3979
3995
|
this.props = props;
|
|
3980
3996
|
this.children = children;
|
|
@@ -3983,12 +3999,6 @@ function FunctionalRenderContext (
|
|
|
3983
3999
|
this.injections = resolveInject(options.inject, parent);
|
|
3984
4000
|
this.slots = function () { return resolveSlots(children, parent); };
|
|
3985
4001
|
|
|
3986
|
-
// ensure the createElement function in functional components
|
|
3987
|
-
// gets a unique context - this is necessary for correct named slot check
|
|
3988
|
-
var contextVm = Object.create(parent);
|
|
3989
|
-
var isCompiled = isTrue(options._compiled);
|
|
3990
|
-
var needNormalization = !isCompiled;
|
|
3991
|
-
|
|
3992
4002
|
// support for compiled functional template
|
|
3993
4003
|
if (isCompiled) {
|
|
3994
4004
|
// exposing $options for renderStatic()
|
|
@@ -4044,23 +4054,28 @@ function createFunctionalComponent (
|
|
|
4044
4054
|
var vnode = options.render.call(null, renderContext._c, renderContext);
|
|
4045
4055
|
|
|
4046
4056
|
if (vnode instanceof VNode) {
|
|
4047
|
-
|
|
4048
|
-
return vnode
|
|
4057
|
+
return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options)
|
|
4049
4058
|
} else if (Array.isArray(vnode)) {
|
|
4050
4059
|
var vnodes = normalizeChildren(vnode) || [];
|
|
4060
|
+
var res = new Array(vnodes.length);
|
|
4051
4061
|
for (var i = 0; i < vnodes.length; i++) {
|
|
4052
|
-
|
|
4062
|
+
res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options);
|
|
4053
4063
|
}
|
|
4054
|
-
return
|
|
4064
|
+
return res
|
|
4055
4065
|
}
|
|
4056
4066
|
}
|
|
4057
4067
|
|
|
4058
|
-
function
|
|
4059
|
-
|
|
4060
|
-
|
|
4068
|
+
function cloneAndMarkFunctionalResult (vnode, data, contextVm, options) {
|
|
4069
|
+
// #7817 clone node before setting fnContext, otherwise if the node is reused
|
|
4070
|
+
// (e.g. it was from a cached normal slot) the fnContext causes named slots
|
|
4071
|
+
// that should not be matched to match.
|
|
4072
|
+
var clone = cloneVNode(vnode);
|
|
4073
|
+
clone.fnContext = contextVm;
|
|
4074
|
+
clone.fnOptions = options;
|
|
4061
4075
|
if (data.slot) {
|
|
4062
|
-
(
|
|
4076
|
+
(clone.data || (clone.data = {})).slot = data.slot;
|
|
4063
4077
|
}
|
|
4078
|
+
return clone
|
|
4064
4079
|
}
|
|
4065
4080
|
|
|
4066
4081
|
function mergeProps (to, from) {
|
|
@@ -4090,7 +4105,7 @@ function mergeProps (to, from) {
|
|
|
4090
4105
|
|
|
4091
4106
|
/* */
|
|
4092
4107
|
|
|
4093
|
-
// hooks to be invoked on component VNodes during patch
|
|
4108
|
+
// inline hooks to be invoked on component VNodes during patch
|
|
4094
4109
|
var componentVNodeHooks = {
|
|
4095
4110
|
init: function init (
|
|
4096
4111
|
vnode,
|
|
@@ -4248,8 +4263,8 @@ function createComponent (
|
|
|
4248
4263
|
}
|
|
4249
4264
|
}
|
|
4250
4265
|
|
|
4251
|
-
//
|
|
4252
|
-
|
|
4266
|
+
// install component management hooks onto the placeholder node
|
|
4267
|
+
installComponentHooks(data);
|
|
4253
4268
|
|
|
4254
4269
|
// return a placeholder vnode
|
|
4255
4270
|
var name = Ctor.options.name || tag;
|
|
@@ -4289,22 +4304,11 @@ function createComponentInstanceForVnode (
|
|
|
4289
4304
|
return new vnode.componentOptions.Ctor(options)
|
|
4290
4305
|
}
|
|
4291
4306
|
|
|
4292
|
-
function
|
|
4293
|
-
|
|
4294
|
-
data.hook = {};
|
|
4295
|
-
}
|
|
4307
|
+
function installComponentHooks (data) {
|
|
4308
|
+
var hooks = data.hook || (data.hook = {});
|
|
4296
4309
|
for (var i = 0; i < hooksToMerge.length; i++) {
|
|
4297
4310
|
var key = hooksToMerge[i];
|
|
4298
|
-
|
|
4299
|
-
var ours = componentVNodeHooks[key];
|
|
4300
|
-
data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
|
|
4301
|
-
}
|
|
4302
|
-
}
|
|
4303
|
-
|
|
4304
|
-
function mergeHook$1 (one, two) {
|
|
4305
|
-
return function (a, b, c, d) {
|
|
4306
|
-
one(a, b, c, d);
|
|
4307
|
-
two(a, b, c, d);
|
|
4311
|
+
hooks[key] = componentVNodeHooks[key];
|
|
4308
4312
|
}
|
|
4309
4313
|
}
|
|
4310
4314
|
|
|
@@ -4945,13 +4949,15 @@ var KeepAlive = {
|
|
|
4945
4949
|
}
|
|
4946
4950
|
},
|
|
4947
4951
|
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4952
|
+
mounted: function mounted () {
|
|
4953
|
+
var this$1 = this;
|
|
4954
|
+
|
|
4955
|
+
this.$watch('include', function (val) {
|
|
4956
|
+
pruneCache(this$1, function (name) { return matches(val, name); });
|
|
4957
|
+
});
|
|
4958
|
+
this.$watch('exclude', function (val) {
|
|
4959
|
+
pruneCache(this$1, function (name) { return !matches(val, name); });
|
|
4960
|
+
});
|
|
4955
4961
|
},
|
|
4956
4962
|
|
|
4957
4963
|
render: function render () {
|
|
@@ -5069,7 +5075,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
|
5069
5075
|
value: FunctionalRenderContext
|
|
5070
5076
|
});
|
|
5071
5077
|
|
|
5072
|
-
Vue.version = '2.5.
|
|
5078
|
+
Vue.version = '2.5.16';
|
|
5073
5079
|
|
|
5074
5080
|
/* */
|
|
5075
5081
|
|
|
@@ -9034,7 +9040,7 @@ function parseHTML (html, options) {
|
|
|
9034
9040
|
|
|
9035
9041
|
var onRE = /^@|^v-on:/;
|
|
9036
9042
|
var dirRE = /^v-|^@|^:/;
|
|
9037
|
-
var forAliasRE = /(
|
|
9043
|
+
var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/;
|
|
9038
9044
|
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
9039
9045
|
var stripParensRE = /^\(|\)$/g;
|
|
9040
9046
|
|
|
@@ -9704,7 +9710,7 @@ function preTransformNode (el, options) {
|
|
|
9704
9710
|
if (map[':type'] || map['v-bind:type']) {
|
|
9705
9711
|
typeBinding = getBindingAttr(el, 'type');
|
|
9706
9712
|
}
|
|
9707
|
-
if (!typeBinding && map['v-bind']) {
|
|
9713
|
+
if (!map.type && !typeBinding && map['v-bind']) {
|
|
9708
9714
|
typeBinding = "(" + (map['v-bind']) + ").type";
|
|
9709
9715
|
}
|
|
9710
9716
|
|
|
@@ -9957,10 +9963,11 @@ var keyNames = {
|
|
|
9957
9963
|
tab: 'Tab',
|
|
9958
9964
|
enter: 'Enter',
|
|
9959
9965
|
space: ' ',
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9966
|
+
// #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
|
|
9967
|
+
up: ['Up', 'ArrowUp'],
|
|
9968
|
+
left: ['Left', 'ArrowLeft'],
|
|
9969
|
+
right: ['Right', 'ArrowRight'],
|
|
9970
|
+
down: ['Down', 'ArrowDown'],
|
|
9964
9971
|
'delete': ['Backspace', 'Delete']
|
|
9965
9972
|
};
|
|
9966
9973
|
|