Answer the question
In order to leave comments, you need to log in
How to implement dynamic import of mdi icons?
Hello, I need to dynamically import mdi icons into a component. I have the following code:
async fetch() {
const name = 'mdiTg'
this.testIcon = await this.getIcon(name)
},
methods: {
async getIcon(name) {
return ({ [name]: name } = await import('@mdi/js'))
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question