Skip to content

Commit 36efc76

Browse files
committed
build: build 2.5.11
1 parent 3f0c628 commit 36efc76

File tree

14 files changed

+533
-1184
lines changed

14 files changed

+533
-1184
lines changed

Diff for: dist/vue.common.js

+61-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v2.5.10
2+
* Vue.js v2.5.11
33
* (c) 2014-2017 Evan You
44
* Released under the MIT License.
55
*/
@@ -342,6 +342,7 @@ var config = ({
342342
/**
343343
* Option merge strategies (used in core/util/options)
344344
*/
345+
// $flow-disable-line
345346
optionMergeStrategies: Object.create(null),
346347

347348
/**
@@ -382,6 +383,7 @@ var config = ({
382383
/**
383384
* Custom user key aliases for v-on
384385
*/
386+
// $flow-disable-line
385387
keyCodes: Object.create(null),
386388

387389
/**
@@ -816,8 +818,7 @@ var arrayMethods = Object.create(arrayProto);[
816818
'splice',
817819
'sort',
818820
'reverse'
819-
]
820-
.forEach(function (method) {
821+
].forEach(function (method) {
821822
// cache original method
822823
var original = arrayProto[method];
823824
def(arrayMethods, method, function mutator () {
@@ -1324,8 +1325,7 @@ function validateComponentName (name) {
13241325
'and must start with a letter.'
13251326
);
13261327
}
1327-
var lower = name.toLowerCase();
1328-
if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
1328+
if (isBuiltInTag(name) || config.isReservedTag(name)) {
13291329
warn(
13301330
'Do not use built-in or reserved HTML elements as component ' +
13311331
'id: ' + name
@@ -1357,6 +1357,9 @@ function normalizeProps (options, vm) {
13571357
for (var key in props) {
13581358
val = props[key];
13591359
name = camelize(key);
1360+
if (process.env.NODE_ENV !== 'production' && isPlainObject(val)) {
1361+
validatePropObject(name, val, vm);
1362+
}
13601363
res[name] = isPlainObject(val)
13611364
? val
13621365
: { type: val };
@@ -1371,6 +1374,26 @@ function normalizeProps (options, vm) {
13711374
options.props = res;
13721375
}
13731376

1377+
/**
1378+
* Validate whether a prop object keys are valid.
1379+
*/
1380+
var propOptionsRE = /^(type|default|required|validator)$/;
1381+
1382+
function validatePropObject (
1383+
propName,
1384+
prop,
1385+
vm
1386+
) {
1387+
for (var key in prop) {
1388+
if (!propOptionsRE.test(key)) {
1389+
warn(
1390+
("Invalid key \"" + key + "\" in validation rules object for prop \"" + propName + "\"."),
1391+
vm
1392+
);
1393+
}
1394+
}
1395+
}
1396+
13741397
/**
13751398
* Normalize all injections into Object-based format
13761399
*/
@@ -2518,6 +2541,8 @@ function eventsMixin (Vue) {
25182541

25192542
/* */
25202543

2544+
2545+
25212546
/**
25222547
* Runtime helper for resolving raw children VNodes into a slot object.
25232548
*/
@@ -2541,10 +2566,10 @@ function resolveSlots (
25412566
if ((child.context === context || child.fnContext === context) &&
25422567
data && data.slot != null
25432568
) {
2544-
var name = child.data.slot;
2569+
var name = data.slot;
25452570
var slot = (slots[name] || (slots[name] = []));
25462571
if (child.tag === 'template') {
2547-
slot.push.apply(slot, child.children);
2572+
slot.push.apply(slot, child.children || []);
25482573
} else {
25492574
slot.push(child);
25502575
}
@@ -3385,6 +3410,7 @@ function getData (data, vm) {
33853410
var computedWatcherOptions = { lazy: true };
33863411

33873412
function initComputed (vm, computed) {
3413+
// $flow-disable-line
33883414
var watchers = vm._computedWatchers = Object.create(null);
33893415
// computed properties are just getters during SSR
33903416
var isSSR = isServerRendering();
@@ -3615,11 +3641,11 @@ function resolveInject (inject, vm) {
36153641
// inject is :any because flow is not smart enough to figure out cached
36163642
var result = Object.create(null);
36173643
var keys = hasSymbol
3618-
? Reflect.ownKeys(inject).filter(function (key) {
3619-
/* istanbul ignore next */
3620-
return Object.getOwnPropertyDescriptor(inject, key).enumerable
3621-
})
3622-
: Object.keys(inject);
3644+
? Reflect.ownKeys(inject).filter(function (key) {
3645+
/* istanbul ignore next */
3646+
return Object.getOwnPropertyDescriptor(inject, key).enumerable
3647+
})
3648+
: Object.keys(inject);
36233649

36243650
for (var i = 0; i < keys.length; i++) {
36253651
var key = keys[i];
@@ -4976,7 +5002,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
49765002
}
49775003
});
49785004

4979-
Vue$3.version = '2.5.10';
5005+
Vue$3.version = '2.5.11';
49805006

49815007
/* */
49825008

@@ -5028,12 +5054,12 @@ function genClassForVnode (vnode) {
50285054
var childNode = vnode;
50295055
while (isDef(childNode.componentInstance)) {
50305056
childNode = childNode.componentInstance._vnode;
5031-
if (childNode.data) {
5057+
if (childNode && childNode.data) {
50325058
data = mergeClassData(childNode.data, data);
50335059
}
50345060
}
50355061
while (isDef(parentNode = parentNode.parent)) {
5036-
if (parentNode.data) {
5062+
if (parentNode && parentNode.data) {
50375063
data = mergeClassData(data, parentNode.data);
50385064
}
50395065
}
@@ -6134,17 +6160,20 @@ function normalizeDirectives$1 (
61346160
) {
61356161
var res = Object.create(null);
61366162
if (!dirs) {
6163+
// $flow-disable-line
61376164
return res
61386165
}
61396166
var i, dir;
61406167
for (i = 0; i < dirs.length; i++) {
61416168
dir = dirs[i];
61426169
if (!dir.modifiers) {
6170+
// $flow-disable-line
61436171
dir.modifiers = emptyModifiers;
61446172
}
61456173
res[getRawDirName(dir)] = dir;
61466174
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
61476175
}
6176+
// $flow-disable-line
61486177
return res
61496178
}
61506179

@@ -6770,11 +6799,11 @@ function genCheckboxModel (
67706799
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
67716800
addProp(el, 'checked',
67726801
"Array.isArray(" + value + ")" +
6773-
"?_i(" + value + "," + valueBinding + ")>-1" + (
6774-
trueValueBinding === 'true'
6775-
? (":(" + value + ")")
6776-
: (":_q(" + value + "," + trueValueBinding + ")")
6777-
)
6802+
"?_i(" + value + "," + valueBinding + ")>-1" + (
6803+
trueValueBinding === 'true'
6804+
? (":(" + value + ")")
6805+
: (":_q(" + value + "," + trueValueBinding + ")")
6806+
)
67786807
);
67796808
addHandler(el, 'change',
67806809
"var $$a=" + value + "," +
@@ -6791,9 +6820,9 @@ function genCheckboxModel (
67916820
}
67926821

67936822
function genRadioModel (
6794-
el,
6795-
value,
6796-
modifiers
6823+
el,
6824+
value,
6825+
modifiers
67976826
) {
67986827
var number = modifiers && modifiers.number;
67996828
var valueBinding = getBindingAttr(el, 'value') || 'null';
@@ -6803,9 +6832,9 @@ function genRadioModel (
68036832
}
68046833

68056834
function genSelect (
6806-
el,
6807-
value,
6808-
modifiers
6835+
el,
6836+
value,
6837+
modifiers
68096838
) {
68106839
var number = modifiers && modifiers.number;
68116840
var selectedVal = "Array.prototype.filter" +
@@ -7094,7 +7123,10 @@ function getStyle (vnode, checkChild) {
70947123
var childNode = vnode;
70957124
while (childNode.componentInstance) {
70967125
childNode = childNode.componentInstance._vnode;
7097-
if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
7126+
if (
7127+
childNode && childNode.data &&
7128+
(styleData = normalizeStyleData(childNode.data))
7129+
) {
70987130
extend(res, styleData);
70997131
}
71007132
}
@@ -8250,7 +8282,7 @@ var TransitionGroup = {
82508282
this._vnode,
82518283
this.kept,
82528284
false, // hydrating
8253-
true // removeOnly (!important, avoids unnecessary moves)
8285+
true // removeOnly (!important avoids unnecessary moves)
82548286
);
82558287
this._vnode = this.kept;
82568288
},
@@ -10574,7 +10606,7 @@ function createCompilerCreator (baseCompile) {
1057410606
// merge custom directives
1057510607
if (options.directives) {
1057610608
finalOptions.directives = extend(
10577-
Object.create(baseOptions.directives),
10609+
Object.create(baseOptions.directives || null),
1057810610
options.directives
1057910611
);
1058010612
}

0 commit comments

Comments
 (0)