fix(runtime-core): fix attr fallthrough on compiled framgent w/ single static element + comments

This commit is contained in:
Evan You
2020-07-21 13:09:58 -04:00
parent 6390ddfb7d
commit 1af3531719
3 changed files with 34 additions and 20 deletions

View File

@@ -10,7 +10,8 @@ import {
openBlock,
createBlock,
FunctionalComponent,
createCommentVNode
createCommentVNode,
Fragment
} from '@vue/runtime-dom'
import { mockWarn } from '@vue/shared'
@@ -573,12 +574,15 @@ describe('attribute fallthrough', () => {
}
const Child = {
setup(props: any) {
return () => [
createCommentVNode('hello'),
h('button'),
createCommentVNode('world')
]
setup() {
return () => (
openBlock(),
createBlock(Fragment, null, [
createCommentVNode('hello'),
h('button'),
createCommentVNode('world')
])
)
}
}