refactor(compiler-sfc): make more explicit regarding template pad behavior
This commit is contained in:
parent
db50009353
commit
5bf72517ce
@ -117,7 +117,7 @@ export function parse(
|
|||||||
descriptor.template = createBlock(
|
descriptor.template = createBlock(
|
||||||
node,
|
node,
|
||||||
source,
|
source,
|
||||||
pad
|
false
|
||||||
) as SFCTemplateBlock
|
) as SFCTemplateBlock
|
||||||
} else {
|
} else {
|
||||||
warnDuplicateBlock(source, filename, node)
|
warnDuplicateBlock(source, filename, node)
|
||||||
@ -207,7 +207,7 @@ function createBlock(
|
|||||||
loc,
|
loc,
|
||||||
attrs
|
attrs
|
||||||
}
|
}
|
||||||
if (node.tag !== 'template' && pad) {
|
if (pad) {
|
||||||
block.content = padContent(source, block, pad) + block.content
|
block.content = padContent(source, block, pad) + block.content
|
||||||
}
|
}
|
||||||
node.props.forEach(p => {
|
node.props.forEach(p => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user