refactor(compiler-sfc): make more explicit regarding template pad behavior

This commit is contained in:
Evan You 2020-04-03 21:11:26 -04:00
parent db50009353
commit 5bf72517ce

View File

@ -117,7 +117,7 @@ export function parse(
descriptor.template = createBlock(
node,
source,
pad
false
) as SFCTemplateBlock
} else {
warnDuplicateBlock(source, filename, node)
@ -207,7 +207,7 @@ function createBlock(
loc,
attrs
}
if (node.tag !== 'template' && pad) {
if (pad) {
block.content = padContent(source, block, pad) + block.content
}
node.props.forEach(p => {