Skip to content

feat(language-core): navigation support for $attrs, $slots, $refs and $el in the template #5056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: remove unnecessary code
  • Loading branch information
KazariEX committed Dec 31, 2024
commit d661954ec860ade86494496eaa80c79b0648e1f6
1 change: 0 additions & 1 deletion packages/language-core/lib/codegen/script/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function createScriptCodegenContext(options: ScriptCodegenOptions) {
return {
generatedTemplate: false,
generatedPropsType: false,
templateGeneratedOffset: undefined as number | undefined,
scriptSetupGeneratedOffset: undefined as number | undefined,
bypassDefineComponent: options.lang === 'js' || options.lang === 'jsx',
bindingNames: new Set([
Expand Down
4 changes: 1 addition & 3 deletions packages/language-core/lib/codegen/script/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function* generateTemplate(
yield* generateTemplateCtx(options);
yield* generateTemplateComponents(options);
yield* generateTemplateDirectives(options);
yield* generateTemplateBody(options, ctx, templateCodegenCtx);
yield* generateTemplateBody(options, templateCodegenCtx);
return templateCodegenCtx;
}

Expand Down Expand Up @@ -110,15 +110,13 @@ export function* generateTemplateDirectives(options: ScriptCodegenOptions): Gene

function* generateTemplateBody(
options: ScriptCodegenOptions,
ctx: ScriptCodegenContext,
templateCodegenCtx: TemplateCodegenContext
): Generator<Code> {
yield* generateStyleScopedClasses(options, templateCodegenCtx);
yield* generateStyleScopedClassReferences(templateCodegenCtx, true);
yield* generateCssVars(options, templateCodegenCtx);

if (options.templateCodegen) {
ctx.templateGeneratedOffset = options.getGeneratedLength();
for (const code of options.templateCodegen.codes) {
yield code;
}
Expand Down
Loading