Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commit015a318

Browse files
committed
build: build 2.5.3
1 parentad673e1 commit015a318

File tree

14 files changed

+914
-375
lines changed

14 files changed

+914
-375
lines changed

‎dist/vue.common.js

Lines changed: 110 additions & 56 deletions
Large diffs are not rendered by default.

‎dist/vue.esm.js

Lines changed: 110 additions & 56 deletions
Large diffs are not rendered by default.

‎dist/vue.js

Lines changed: 110 additions & 56 deletions
Large diffs are not rendered by default.

‎dist/vue.min.js

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

‎dist/vue.runtime.common.js

Lines changed: 66 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v2.5.2
2+
* Vue.js v2.5.3
33
* (c) 2014-2017 Evan You
44
* Released under the MIT License.
55
*/
@@ -756,23 +756,29 @@ function createTextVNode (val) {
756756
// multiple renders, cloning them avoids errors when DOM manipulations rely
757757
// on their elm reference.
758758
functioncloneVNode(vnode,deep){
759+
varcomponentOptions=vnode.componentOptions;
759760
varcloned=newVNode(
760761
vnode.tag,
761762
vnode.data,
762763
vnode.children,
763764
vnode.text,
764765
vnode.elm,
765766
vnode.context,
766-
vnode.componentOptions,
767+
componentOptions,
767768
vnode.asyncFactory
768769
);
769770
cloned.ns=vnode.ns;
770771
cloned.isStatic=vnode.isStatic;
771772
cloned.key=vnode.key;
772773
cloned.isComment=vnode.isComment;
773774
cloned.isCloned=true;
774-
if(deep&&vnode.children){
775-
cloned.children=cloneVNodes(vnode.children);
775+
if(deep){
776+
if(vnode.children){
777+
cloned.children=cloneVNodes(vnode.children,true);
778+
}
779+
if(componentOptions&&componentOptions.children){
780+
componentOptions.children=cloneVNodes(componentOptions.children,true);
781+
}
776782
}
777783
returncloned
778784
}
@@ -1005,7 +1011,7 @@ function set (target, key, val) {
10051011
target.splice(key,1,val);
10061012
returnval
10071013
}
1008-
if(hasOwn(target,key)){
1014+
if(keyintarget&&!(keyinObject.prototype)){
10091015
target[key]=val;
10101016
returnval
10111017
}
@@ -1137,7 +1143,7 @@ function mergeDataOrFn (
11371143
typeofparentVal==='function' ?parentVal.call(this) :parentVal
11381144
)
11391145
}
1140-
}elseif(parentVal||childVal){
1146+
}else{
11411147
returnfunctionmergedInstanceDataFn(){
11421148
// instance merge
11431149
varinstanceData=typeofchildVal==='function'
@@ -1171,7 +1177,7 @@ strats.data = function (
11711177

11721178
returnparentVal
11731179
}
1174-
returnmergeDataOrFn.call(this,parentVal,childVal)
1180+
returnmergeDataOrFn(parentVal,childVal)
11751181
}
11761182

11771183
returnmergeDataOrFn(parentVal,childVal,vm)
@@ -1977,6 +1983,9 @@ function updateListeners (
19771983
/* */
19781984

19791985
functionmergeVNodeHook(def,hookKey,hook){
1986+
if(definstanceofVNode){
1987+
def=def.data.hook||(def.data.hook={});
1988+
}
19801989
varinvoker;
19811990
varoldHook=def[hookKey];
19821991

@@ -2344,6 +2353,7 @@ function updateComponentListeners (
23442353
){
23452354
target=vm;
23462355
updateListeners(listeners,oldListeners||{},add,remove$1,vm);
2356+
target=undefined;
23472357
}
23482358

23492359
functioneventsMixin(Vue){
@@ -2399,7 +2409,7 @@ function eventsMixin (Vue) {
23992409
if(!cbs){
24002410
returnvm
24012411
}
2402-
if(arguments.length===1){
2412+
if(!fn){
24032413
vm._events[event]=null;
24042414
returnvm
24052415
}
@@ -2461,7 +2471,6 @@ function resolveSlots (
24612471
if(!children){
24622472
returnslots
24632473
}
2464-
vardefaultSlot=[];
24652474
for(vari=0,l=children.length;i<l;i++){
24662475
varchild=children[i];
24672476
vardata=child.data;
@@ -2482,12 +2491,14 @@ function resolveSlots (
24822491
slot.push(child);
24832492
}
24842493
}else{
2485-
defaultSlot.push(child);
2494+
(slots.default||(slots.default=[])).push(child);
24862495
}
24872496
}
2488-
// ignore whitespace
2489-
if(!defaultSlot.every(isWhitespace)){
2490-
slots.default=defaultSlot;
2497+
// ignore slots that contains only whitespace
2498+
for(varname$1inslots){
2499+
if(slots[name$1].every(isWhitespace)){
2500+
deleteslots[name$1];
2501+
}
24912502
}
24922503
returnslots
24932504
}
@@ -3651,6 +3662,7 @@ function renderSlot (
36513662
bindObject
36523663
){
36533664
varscopedSlotFn=this.$scopedSlots[name];
3665+
varnodes;
36543666
if(scopedSlotFn){// scoped slot
36553667
props=props||{};
36563668
if(bindObject){
@@ -3662,19 +3674,28 @@ function renderSlot (
36623674
}
36633675
props=extend(extend({},bindObject),props);
36643676
}
3665-
returnscopedSlotFn(props)||fallback
3677+
nodes=scopedSlotFn(props)||fallback;
36663678
}else{
36673679
varslotNodes=this.$slots[name];
36683680
// warn duplicate slot usage
3669-
if(slotNodes&&process.env.NODE_ENV!=='production'){
3670-
slotNodes._rendered&&warn(
3671-
"Duplicate presence of slot \""+name+"\" found in the same render tree "+
3672-
"- this will likely cause render errors.",
3673-
this
3674-
);
3681+
if(slotNodes){
3682+
if(process.env.NODE_ENV!=='production'&&slotNodes._rendered){
3683+
warn(
3684+
"Duplicate presence of slot \""+name+"\" found in the same render tree "+
3685+
"- this will likely cause render errors.",
3686+
this
3687+
);
3688+
}
36753689
slotNodes._rendered=true;
36763690
}
3677-
returnslotNodes||fallback
3691+
nodes=slotNodes||fallback;
3692+
}
3693+
3694+
vartarget=props&&props.slot;
3695+
if(target){
3696+
returnthis.$createElement('template',{slot:target},nodes)
3697+
}else{
3698+
returnnodes
36783699
}
36793700
}
36803701

@@ -4829,8 +4850,8 @@ var KeepAlive = {
48294850
// check pattern
48304851
varname=getComponentName(componentOptions);
48314852
if(name&&(
4832-
(this.include&&!matches(this.include,name))||
4833-
(this.exclude&&matches(this.exclude,name))
4853+
(this.exclude&&matches(this.exclude,name))||
4854+
(this.include&&!matches(this.include,name))
48344855
)){
48354856
returnvnode
48364857
}
@@ -4926,7 +4947,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
49264947
}
49274948
});
49284949

4929-
Vue$3.version='2.5.2';
4950+
Vue$3.version='2.5.3';
49304951

49314952
/* */
49324953

@@ -5907,9 +5928,12 @@ function createPatchFunction (backend) {
59075928
// create an empty node and replace it
59085929
oldVnode=emptyNodeAt(oldVnode);
59095930
}
5931+
59105932
// replacing existing element
59115933
varoldElm=oldVnode.elm;
59125934
varparentElm$1=nodeOps.parentNode(oldElm);
5935+
5936+
// create new node
59135937
createElm(
59145938
vnode,
59155939
insertedVnodeQueue,
@@ -5920,9 +5944,8 @@ function createPatchFunction (backend) {
59205944
nodeOps.nextSibling(oldElm)
59215945
);
59225946

5947+
// update parent placeholder node element, recursively
59235948
if(isDef(vnode.parent)){
5924-
// component root element replaced.
5925-
// update parent placeholder node element, recursively
59265949
varancestor=vnode.parent;
59275950
varpatchable=isPatchable(vnode);
59285951
while(ancestor){
@@ -5951,6 +5974,7 @@ function createPatchFunction (backend) {
59515974
}
59525975
}
59535976

5977+
// destroy old node
59545978
if(isDef(parentElm$1)){
59555979
removeVnodes(parentElm$1,[oldVnode],0,0);
59565980
}elseif(isDef(oldVnode.tag)){
@@ -6016,14 +6040,14 @@ function _update (oldVnode, vnode) {
60166040
}
60176041
};
60186042
if(isCreate){
6019-
mergeVNodeHook(vnode.data.hook||(vnode.data.hook={}),'insert',callInsert);
6043+
mergeVNodeHook(vnode,'insert',callInsert);
60206044
}else{
60216045
callInsert();
60226046
}
60236047
}
60246048

60256049
if(dirsWithPostpatch.length){
6026-
mergeVNodeHook(vnode.data.hook||(vnode.data.hook={}),'postpatch',function(){
6050+
mergeVNodeHook(vnode,'postpatch',function(){
60276051
for(vari=0;i<dirsWithPostpatch.length;i++){
60286052
callHook$1(dirsWithPostpatch[i],'componentUpdated',vnode,oldVnode);
60296053
}
@@ -6315,6 +6339,7 @@ function updateDOMListeners (oldVnode, vnode) {
63156339
target$1=vnode.elm;
63166340
normalizeEvents(on);
63176341
updateListeners(on,oldOn,add$1,remove$2,vnode.context);
6342+
target$1=undefined;
63186343
}
63196344

63206345
varevents={
@@ -6920,7 +6945,7 @@ function enter (vnode, toggleDisplay) {
69206945

69216946
if(!vnode.data.show){
69226947
// remove pending leave element on enter by injecting an insert hook
6923-
mergeVNodeHook(vnode.data.hook||(vnode.data.hook={}),'insert',function(){
6948+
mergeVNodeHook(vnode,'insert',function(){
69246949
varparent=el.parentNode;
69256950
varpendingNode=parent&&parent._pending&&parent._pending[vnode.key];
69266951
if(pendingNode&&
@@ -7159,10 +7184,17 @@ if (isIE9) {
71597184
});
71607185
}
71617186

7162-
varmodel$1={
7163-
inserted:functioninserted(el,binding,vnode){
7187+
vardirective={
7188+
inserted:functioninserted(el,binding,vnode,oldVnode){
71647189
if(vnode.tag==='select'){
7165-
setSelected(el,binding,vnode.context);
7190+
// #6903
7191+
if(oldVnode.elm&&!oldVnode.elm._vOptions){
7192+
mergeVNodeHook(vnode,'postpatch',function(){
7193+
directive.componentUpdated(el,binding,vnode);
7194+
});
7195+
}else{
7196+
setSelected(el,binding,vnode.context);
7197+
}
71667198
el._vOptions=[].map.call(el.options,getValue);
71677199
}elseif(vnode.tag==='textarea'||isTextInputType(el.type)){
71687200
el._vModifiers=binding.modifiers;
@@ -7183,6 +7215,7 @@ var model$1 = {
71837215
}
71847216
}
71857217
},
7218+
71867219
componentUpdated:functioncomponentUpdated(el,binding,vnode){
71877220
if(vnode.tag==='select'){
71887221
setSelected(el,binding,vnode.context);
@@ -7341,7 +7374,7 @@ var show = {
73417374
};
73427375

73437376
varplatformDirectives={
7344-
model:model$1,
7377+
model:directive,
73457378
show:show
73467379
};
73477380

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp