|
@@ -478,7 +478,7 @@ describe('codegen', () => {
|
|
|
// have "inline-template'"
|
|
// have "inline-template'"
|
|
|
assertCodegen(
|
|
assertCodegen(
|
|
|
'<my-component inline-template><p><span>hello world</span></p></my-component>',
|
|
'<my-component inline-template><p><span>hello world</span></p></my-component>',
|
|
|
- `with(this){return _c('my-component',{inlineTemplate:{render:function(){with(this){return _m(0,false,false)}},staticRenderFns:[function(){with(this){return _c('p',[_c('span',[_v("hello world")])])}}]}})}`
|
|
|
|
|
|
|
+ `with(this){return _c('my-component',{inlineTemplate:{render:function(){with(this){return _m(0)}},staticRenderFns:[function(){with(this){return _c('p',[_c('span',[_v("hello world")])])}}]}})}`
|
|
|
)
|
|
)
|
|
|
// "have inline-template attrs, but not having exactly one child element
|
|
// "have inline-template attrs, but not having exactly one child element
|
|
|
assertCodegen(
|
|
assertCodegen(
|
|
@@ -498,7 +498,7 @@ describe('codegen', () => {
|
|
|
it('generate static trees inside v-for', () => {
|
|
it('generate static trees inside v-for', () => {
|
|
|
assertCodegen(
|
|
assertCodegen(
|
|
|
`<div><div v-for="i in 10"><p><span></span></p></div></div>`,
|
|
`<div><div v-for="i in 10"><p><span></span></p></div></div>`,
|
|
|
- `with(this){return _c('div',_l((10),function(i){return _c('div',[_m(0,true,false)])}))}`,
|
|
|
|
|
|
|
+ `with(this){return _c('div',_l((10),function(i){return _c('div',[_m(0,true)])}))}`,
|
|
|
[`with(this){return _c('p',[_c('span')])}`]
|
|
[`with(this){return _c('p',[_c('span')])}`]
|
|
|
)
|
|
)
|
|
|
})
|
|
})
|