vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.33k stars 6.93k forks source link

[Bug Report][3.1.1] v-icon puts imported mdi/js icon output into the class attribute of the element #16423

Closed djurdjen closed 1 year ago

djurdjen commented 1 year ago

Environment

Vuetify Version: 3.1.1 Vue Version: 3.2.45 Browsers: Chrome 108.0.0.0 OS: Mac OS 10.15.7

Steps to reproduce

Expected Behavior

The v-icon component should output an element with an svg and path

Actual Behavior

The path is being added into the class attribute and the icon is not being rendered

Reproduction Link

https://codepen.io/djurdjen/pen/jOpmQPq?editors=101

Other comments

The provided codepen is a copy from the pen in the vuetify documentation (https://next.vuetifyjs.com/en/components/icons/)

Ismaele-silla commented 1 year ago

I don't know if this can help others, but I had the same issue, using "aliases" as written here: https://next.vuetifyjs.com/en/features/icon-fonts/#material-design-icons-js-svg It was my fault, though: instead of importing import { aliases, mdi } from "vuetify/iconsets/mdi-svg"; I was importing import { aliases, mdi } from "vuetify/iconsets/mdi"; Adding -svg and importing the right settings fixed the problem for me.

djurdjen commented 1 year ago

This seemed to do the trick! Thanks @Ismaele-silla !