Skip to content

Commit 6441eac

Browse files
committed
build: build 2.6.3
1 parent dae7e41 commit 6441eac

19 files changed

+16295
-15926
lines changed

dist/vue.common.dev.js

+2,107-2,059
Large diffs are not rendered by default.

dist/vue.common.prod.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue.esm.browser.js

+2,115-2,065
Large diffs are not rendered by default.

dist/vue.esm.browser.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue.esm.js

+2,116-2,068
Large diffs are not rendered by default.

dist/vue.js

+2,107-2,059
Large diffs are not rendered by default.

dist/vue.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue.runtime.common.dev.js

+2,061-2,048
Large diffs are not rendered by default.

dist/vue.runtime.common.prod.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue.runtime.esm.js

+2,079-2,066
Large diffs are not rendered by default.

dist/vue.runtime.js

+2,061-2,048
Large diffs are not rendered by default.

dist/vue.runtime.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vue-server-renderer/basic.js

+774-742
Large diffs are not rendered by default.

packages/vue-server-renderer/build.dev.js

+774-742
Large diffs are not rendered by default.

packages/vue-server-renderer/build.prod.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vue-server-renderer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-server-renderer",
3-
"version": "2.6.2",
3+
"version": "2.6.3",
44
"description": "server renderer for Vue 2.0",
55
"main": "index.js",
66
"types": "types/index.d.ts",

packages/vue-template-compiler/browser.js

+44-8
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@
745745
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
746746
var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
747747
var isPhantomJS = UA && /phantomjs/.test(UA);
748+
var isFF = UA && UA.match(/firefox\/(\d+)/);
748749

749750
// Firefox has a "watch" function on Object.prototype...
750751
var nativeWatch = ({}).watch;
@@ -2747,6 +2748,8 @@
27472748

27482749
var decodeHTMLCached = cached(he.decode);
27492750

2751+
var emptySlotScopeToken = "_empty_";
2752+
27502753
// configurable state
27512754
var warn$1;
27522755
var delimiters;
@@ -3359,7 +3362,7 @@
33593362
var dynamic = ref.dynamic;
33603363
el.slotTarget = name;
33613364
el.slotTargetDynamic = dynamic;
3362-
el.slotScope = slotBinding.value || "_"; // force it into a scoped slot for perf
3365+
el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
33633366
}
33643367
} else {
33653368
// v-slot on component, denotes default slot
@@ -3394,8 +3397,13 @@
33943397
var slotContainer = slots[name$1] = createASTElement('template', [], el);
33953398
slotContainer.slotTarget = name$1;
33963399
slotContainer.slotTargetDynamic = dynamic$1;
3397-
slotContainer.children = el.children.filter(function (c) { return !(c).slotScope; });
3398-
slotContainer.slotScope = slotBinding$1.value || "_";
3400+
slotContainer.children = el.children.filter(function (c) {
3401+
if (!c.slotScope) {
3402+
c.parent = slotContainer;
3403+
return true
3404+
}
3405+
});
3406+
slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken;
33993407
// remove children as they are returned from scopedSlots now
34003408
el.children = [];
34013409
// mark el non-plain so data gets generated
@@ -4490,7 +4498,7 @@
44904498
}
44914499
// scoped slots
44924500
if (el.scopedSlots) {
4493-
data += (genScopedSlots(el.scopedSlots, state)) + ",";
4501+
data += (genScopedSlots(el, el.scopedSlots, state)) + ",";
44944502
}
44954503
// component v-model
44964504
if (el.model) {
@@ -4561,16 +4569,34 @@
45614569
}
45624570

45634571
function genScopedSlots (
4572+
el,
45644573
slots,
45654574
state
45664575
) {
4567-
var hasDynamicKeys = Object.keys(slots).some(function (key) {
4576+
// by default scoped slots are considered "stable", this allows child
4577+
// components with only scoped slots to skip forced updates from parent.
4578+
// but in some cases we have to bail-out of this optimization
4579+
// for example if the slot contains dynamic names, has v-if or v-for on them...
4580+
var needsForceUpdate = Object.keys(slots).some(function (key) {
45684581
var slot = slots[key];
45694582
return slot.slotTargetDynamic || slot.if || slot.for
45704583
});
4584+
// OR when it is inside another scoped slot (the reactivity is disconnected)
4585+
// #9438
4586+
if (!needsForceUpdate) {
4587+
var parent = el.parent;
4588+
while (parent) {
4589+
if (parent.slotScope && parent.slotScope !== emptySlotScopeToken) {
4590+
needsForceUpdate = true;
4591+
break
4592+
}
4593+
parent = parent.parent;
4594+
}
4595+
}
4596+
45714597
return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
45724598
return genScopedSlot(slots[key], state)
4573-
}).join(',')) + "]" + (hasDynamicKeys ? ",true" : "") + ")")
4599+
}).join(',')) + "]" + (needsForceUpdate ? ",true" : "") + ")")
45744600
}
45754601

45764602
function genScopedSlot (
@@ -4584,7 +4610,10 @@
45844610
if (el.for && !el.forProcessed) {
45854611
return genFor(el, state, genScopedSlot)
45864612
}
4587-
var fn = "function(" + (String(el.slotScope)) + "){" +
4613+
var slotScope = el.slotScope === emptySlotScopeToken
4614+
? ""
4615+
: String(el.slotScope);
4616+
var fn = "function(" + slotScope + "){" +
45884617
"return " + (el.tag === 'template'
45894618
? el.if && isLegacySyntax
45904619
? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
@@ -4677,7 +4706,14 @@
46774706
var slotName = el.slotName || '"default"';
46784707
var children = genChildren(el, state);
46794708
var res = "_t(" + slotName + (children ? ("," + children) : '');
4680-
var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
4709+
var attrs = el.attrs || el.dynamicAttrs
4710+
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
4711+
// slot props are camelized
4712+
name: camelize(attr.name),
4713+
value: attr.value,
4714+
dynamic: attr.dynamic
4715+
}); }))
4716+
: null;
46814717
var bind$$1 = el.attrsMap['v-bind'];
46824718
if ((attrs || bind$$1) && !children) {
46834719
res += ",null";

packages/vue-template-compiler/build.js

+44-8
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'
703703
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
704704
var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
705705
var isPhantomJS = UA && /phantomjs/.test(UA);
706+
var isFF = UA && UA.match(/firefox\/(\d+)/);
706707

707708
// Firefox has a "watch" function on Object.prototype...
708709
var nativeWatch = ({}).watch;
@@ -2367,6 +2368,8 @@ var invalidAttributeRE = /[\s"'<>\/=]/;
23672368

23682369
var decodeHTMLCached = cached(he.decode);
23692370

2371+
var emptySlotScopeToken = "_empty_";
2372+
23702373
// configurable state
23712374
var warn$1;
23722375
var delimiters;
@@ -2979,7 +2982,7 @@ function processSlotContent (el) {
29792982
var dynamic = ref.dynamic;
29802983
el.slotTarget = name;
29812984
el.slotTargetDynamic = dynamic;
2982-
el.slotScope = slotBinding.value || "_"; // force it into a scoped slot for perf
2985+
el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
29832986
}
29842987
} else {
29852988
// v-slot on component, denotes default slot
@@ -3014,8 +3017,13 @@ function processSlotContent (el) {
30143017
var slotContainer = slots[name$1] = createASTElement('template', [], el);
30153018
slotContainer.slotTarget = name$1;
30163019
slotContainer.slotTargetDynamic = dynamic$1;
3017-
slotContainer.children = el.children.filter(function (c) { return !(c).slotScope; });
3018-
slotContainer.slotScope = slotBinding$1.value || "_";
3020+
slotContainer.children = el.children.filter(function (c) {
3021+
if (!c.slotScope) {
3022+
c.parent = slotContainer;
3023+
return true
3024+
}
3025+
});
3026+
slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken;
30193027
// remove children as they are returned from scopedSlots now
30203028
el.children = [];
30213029
// mark el non-plain so data gets generated
@@ -4121,7 +4129,7 @@ function genData$2 (el, state) {
41214129
}
41224130
// scoped slots
41234131
if (el.scopedSlots) {
4124-
data += (genScopedSlots(el.scopedSlots, state)) + ",";
4132+
data += (genScopedSlots(el, el.scopedSlots, state)) + ",";
41254133
}
41264134
// component v-model
41274135
if (el.model) {
@@ -4194,16 +4202,34 @@ function genInlineTemplate (el, state) {
41944202
}
41954203

41964204
function genScopedSlots (
4205+
el,
41974206
slots,
41984207
state
41994208
) {
4200-
var hasDynamicKeys = Object.keys(slots).some(function (key) {
4209+
// by default scoped slots are considered "stable", this allows child
4210+
// components with only scoped slots to skip forced updates from parent.
4211+
// but in some cases we have to bail-out of this optimization
4212+
// for example if the slot contains dynamic names, has v-if or v-for on them...
4213+
var needsForceUpdate = Object.keys(slots).some(function (key) {
42014214
var slot = slots[key];
42024215
return slot.slotTargetDynamic || slot.if || slot.for
42034216
});
4217+
// OR when it is inside another scoped slot (the reactivity is disconnected)
4218+
// #9438
4219+
if (!needsForceUpdate) {
4220+
var parent = el.parent;
4221+
while (parent) {
4222+
if (parent.slotScope && parent.slotScope !== emptySlotScopeToken) {
4223+
needsForceUpdate = true;
4224+
break
4225+
}
4226+
parent = parent.parent;
4227+
}
4228+
}
4229+
42044230
return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
42054231
return genScopedSlot(slots[key], state)
4206-
}).join(',')) + "]" + (hasDynamicKeys ? ",true" : "") + ")")
4232+
}).join(',')) + "]" + (needsForceUpdate ? ",true" : "") + ")")
42074233
}
42084234

42094235
function genScopedSlot (
@@ -4217,7 +4243,10 @@ function genScopedSlot (
42174243
if (el.for && !el.forProcessed) {
42184244
return genFor(el, state, genScopedSlot)
42194245
}
4220-
var fn = "function(" + (String(el.slotScope)) + "){" +
4246+
var slotScope = el.slotScope === emptySlotScopeToken
4247+
? ""
4248+
: String(el.slotScope);
4249+
var fn = "function(" + slotScope + "){" +
42214250
"return " + (el.tag === 'template'
42224251
? el.if && isLegacySyntax
42234252
? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
@@ -4310,7 +4339,14 @@ function genSlot (el, state) {
43104339
var slotName = el.slotName || '"default"';
43114340
var children = genChildren(el, state);
43124341
var res = "_t(" + slotName + (children ? ("," + children) : '');
4313-
var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
4342+
var attrs = el.attrs || el.dynamicAttrs
4343+
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
4344+
// slot props are camelized
4345+
name: camelize(attr.name),
4346+
value: attr.value,
4347+
dynamic: attr.dynamic
4348+
}); }))
4349+
: null;
43144350
var bind$$1 = el.attrsMap['v-bind'];
43154351
if ((attrs || bind$$1) && !children) {
43164352
res += ",null";

packages/vue-template-compiler/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-template-compiler",
3-
"version": "2.6.2",
3+
"version": "2.6.3",
44
"description": "template compiler for Vue 2.0",
55
"main": "index.js",
66
"unpkg": "browser.js",

0 commit comments

Comments
 (0)