Skip to content

Commit 1c2e858

Browse files
committed
[build] 2.1.0
1 parent 99251ec commit 1c2e858

File tree

11 files changed

+12140
-9250
lines changed

11 files changed

+12140
-9250
lines changed

dist/vue.common.js

Lines changed: 6215 additions & 3893 deletions
Large diffs are not rendered by default.

dist/vue.js

Lines changed: 2641 additions & 2477 deletions
Large diffs are not rendered by default.

dist/vue.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue.runtime.common.js

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v2.0.7
2+
* Vue.js v2.1.0
33
* (c) 2014-2016 Evan You
44
* Released under the MIT License.
55
*/
@@ -371,14 +371,20 @@ var nextTick = (function () {
371371
}
372372

373373
return function queueNextTick (cb, ctx) {
374-
var func = ctx
375-
? function () { cb.call(ctx); }
376-
: cb;
377-
callbacks.push(func);
374+
var _resolve;
375+
callbacks.push(function () {
376+
if (cb) { cb.call(ctx); }
377+
if (_resolve) { _resolve(ctx); }
378+
});
378379
if (!pending) {
379380
pending = true;
380381
timerFunc();
381382
}
383+
if (!cb && typeof Promise !== 'undefined') {
384+
return new Promise(function (resolve) {
385+
_resolve = resolve;
386+
})
387+
}
382388
}
383389
})();
384390

@@ -2829,7 +2835,7 @@ function initRender (vm) {
28292835

28302836
function renderMixin (Vue) {
28312837
Vue.prototype.$nextTick = function (fn) {
2832-
nextTick(fn, this);
2838+
return nextTick(fn, this)
28332839
};
28342840

28352841
Vue.prototype._render = function () {
@@ -3228,6 +3234,7 @@ function resolveConstructorOptions (Ctor) {
32283234
Ctor.superOptions = superOptions;
32293235
extendOptions.render = options.render;
32303236
extendOptions.staticRenderFns = options.staticRenderFns;
3237+
extendOptions._scopeId = options._scopeId;
32313238
options = Ctor.options = mergeOptions(superOptions, extendOptions);
32323239
if (options.name) {
32333240
options.components[options.name] = Ctor;
@@ -3383,20 +3390,44 @@ function initAssetRegisters (Vue) {
33833390
});
33843391
}
33853392

3393+
/* */
3394+
3395+
var patternTypes = [String, RegExp];
3396+
3397+
function matches (pattern, name) {
3398+
if (typeof pattern === 'string') {
3399+
return pattern.split(',').indexOf(name) > -1
3400+
} else {
3401+
return pattern.test(name)
3402+
}
3403+
}
3404+
33863405
var KeepAlive = {
33873406
name: 'keep-alive',
33883407
abstract: true,
3408+
props: {
3409+
include: patternTypes,
3410+
exclude: patternTypes
3411+
},
33893412
created: function created () {
33903413
this.cache = Object.create(null);
33913414
},
33923415
render: function render () {
33933416
var vnode = getFirstComponentChild(this.$slots.default);
33943417
if (vnode && vnode.componentOptions) {
33953418
var opts = vnode.componentOptions;
3419+
// check pattern
3420+
var name = opts.Ctor.options.name || opts.tag;
3421+
if (name && (
3422+
(this.include && !matches(this.include, name)) ||
3423+
(this.exclude && matches(this.exclude, name))
3424+
)) {
3425+
return vnode
3426+
}
33963427
var key = vnode.key == null
33973428
// same constructor may get registered as different local components
33983429
// so cid alone is not enough (#3269)
3399-
? opts.Ctor.cid + '::' + opts.tag
3430+
? opts.Ctor.cid + (opts.tag ? ("::" + (opts.tag)) : '')
34003431
: vnode.key;
34013432
if (this.cache[key]) {
34023433
vnode.child = this.cache[key].child;
@@ -3464,7 +3495,7 @@ Object.defineProperty(Vue$2.prototype, '$isServer', {
34643495
get: isServerRendering
34653496
});
34663497

3467-
Vue$2.version = '2.0.7';
3498+
Vue$2.version = '2.1.0';
34683499

34693500
/* */
34703501

0 commit comments

Comments
 (0)