File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ export const TRANSITION = 1100
5
5
export const EL = 1500
6
6
export const COMPONENT = 1500
7
7
export const PARTIAL = 1750
8
- export const SLOT = 1750
9
8
export const FOR = 2000
10
9
export const IF = 2000
10
+ export const SLOT = 2100
Original file line number Diff line number Diff line change @@ -445,4 +445,27 @@ describe('Misc', function () {
445
445
} )
446
446
expect ( vm . $el . firstChild . className ) . toBe ( 'outer-hi' )
447
447
} )
448
+
449
+ // #2163
450
+ it ( 'slot compilation order with v-if' , function ( ) {
451
+ var vm = new Vue ( {
452
+ el : document . createElement ( 'div' ) ,
453
+ template :
454
+ '<test>' +
455
+ '<div slot="one">slot1</div>' +
456
+ 'default content' +
457
+ '</test>' ,
458
+ components : {
459
+ test : {
460
+ template :
461
+ '<div>' +
462
+ '<slot v-if="true"></slot> ' +
463
+ '<slot name="one"></slot>' +
464
+ '</div>' ,
465
+ replace : true
466
+ }
467
+ }
468
+ } )
469
+ expect ( vm . $el . textContent ) . toBe ( 'default content slot1' )
470
+ } )
448
471
} )
You can’t perform that action at this time.
0 commit comments