Skip to content
Merged
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
7 changes: 7 additions & 0 deletions src/core/resolvers/tdesign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

return {
name: 'QRCode',
from: `tdesign-${library}${importFrom}`,
}
}

if (name.match(/^T[A-Z]/) || pluginList.includes(name)) {
const importName = name.match(/^T[A-Z]/) ? name.slice(1) : name

Expand Down
Loading