We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example in vue3 render function I want to render different icons in real time through strings
const test: object[] = [ { key: 'xcionsComponentName' }, { key: 'xcionsComponentName2' } ]
I want to use key or other variable names to control the display xicons svg
The text was updated successfully, but these errors were encountered:
you can import all the icons from dependency like @vicons/carbon or others.
@vicons/carbon
import * as icons from '@vicons/carbon'
then create a function to resolve the icon's name type string to import the icon dynamically.
export const renderIcon = (name: string) => { const icon = Object.entries(icons).filter(i => i[0] === name) if (icon.length > 0) { return () => h(NIcon, null, { default: () => h(icon[0][1]) }) } }
if you have multi icon packages just create a object to contact them.
Sorry, something went wrong.
No branches or pull requests
Example
in vue3 render function
I want to render different icons in real time through strings
I want to use key or other variable names to control the display xicons svg
The text was updated successfully, but these errors were encountered: