Skip to content

Commit

Permalink
fix: remove redundant virtual code capabilities on slot tag
Browse files Browse the repository at this point in the history
close #1151
  • Loading branch information
johnsoncodehk committed Apr 10, 2022
1 parent b65d794 commit f79cba9
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions packages/vue-code-gen/src/generators/template.ts
Expand Up @@ -1462,7 +1462,10 @@ export function generate(
}
}
function writeSlots(node: CompilerDOM.ElementNode) {
if (node.tag !== 'slot') return;

if (node.tag !== 'slot')
return;

const varDefaultBind = `__VLS_${elementIndex++}`;
const varBinds = `__VLS_${elementIndex++}`;
const varSlot = `__VLS_${elementIndex++}`;
Expand All @@ -1483,16 +1486,11 @@ export function generate(
prop.exp.loc.start.offset,
{
vueTag: 'template',
capabilities: capabilitiesSet.all,
capabilities: capabilitiesSet.attrReference,
},
'(',
')',
);
writeFormatCode(
prop.exp.content,
prop.exp.loc.start.offset,
formatBrackets.round,
);
tsCodeGen.addText(`;\n`);
break;
}
Expand Down Expand Up @@ -1526,16 +1524,11 @@ export function generate(
prop.exp.loc.start.offset,
{
vueTag: 'template',
capabilities: capabilitiesSet.all,
capabilities: capabilitiesSet.attrReference,
},
'(',
')',
);
writeFormatCode(
prop.exp.content,
prop.exp.loc.start.offset,
formatBrackets.round,
);
tsCodeGen.addText(`,\n`);
}
else if (
Expand Down

0 comments on commit f79cba9

Please sign in to comment.