File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
test/unit/specs/element-directives Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ module.exports = {
8282 compile : function ( content , context , host ) {
8383 if ( content && context ) {
8484 this . unlink = context . $compile (
85- content , host , this . _scope , this . _frag
85+ content , host , this . vm . _scope , this . _frag
8686 )
8787 }
8888 if ( content ) {
Original file line number Diff line number Diff line change @@ -347,4 +347,20 @@ describe('Slot Distribution', function () {
347347 expect ( el . innerHTML ) . toBe ( 'hello world' )
348348 } )
349349
350+ it ( 'inside v-for' , function ( ) {
351+ var vm = new Vue ( {
352+ el : el ,
353+ template : '<comp v-for="item in items">{{item.value}}</comp>' ,
354+ data : {
355+ items : [ { value : 123 } , { value : 234 } ]
356+ } ,
357+ components : {
358+ comp : {
359+ tempalte : '<div><slot></slot></div>'
360+ }
361+ }
362+ } )
363+ expect ( el . textContent ) . toBe ( '123234' )
364+ } )
365+
350366} )
You can’t perform that action at this time.
0 commit comments