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