Skip to content

Conversation

Mrbunker
Copy link
Contributor

Description

Fix TDesign "QRCode" component cannot be imported due to case sensitivity.
Modify the export to be "QRCode" instead of "Qrcode".

image

Additional context

Code reference: https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/auto-import-resolver/src/resolver.ts

@Mrbunker Mrbunker requested a review from antfu as a code owner August 29, 2025 17:17
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@ilyaliao ilyaliao changed the title fix: add QRCode component support to TDesign resolver fix(tdesign): add QRCode component support Aug 30, 2025
@@ -53,6 +53,13 @@ export function TDesignResolver(options: TDesignResolverOptions = {}): Component
}
}

if (name.startsWith('TQrcode') || name.startsWith('Qrcode')) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need name.startsWith('Qrcode') here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the above code
(name.startsWith('TTypography') || name.startsWith('Typography'))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it and found that startsWith('Qrcode') is redundant.
I will remove it

@antfu antfu merged commit ed98de3 into unplugin:main Sep 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants