custom icons importation

This commit is contained in:
Carlos Jimenez Ruiz 2022-03-09 16:53:01 +01:00
parent bbde49479b
commit d223a5b029
1 changed files with 2 additions and 7 deletions

View File

@ -7,16 +7,11 @@ import { useQuasar } from 'quasar';
const quasar = useQuasar(); const quasar = useQuasar();
quasar.iconMapFn = (iconName) => { quasar.iconMapFn = (iconName) => {
// iconName is the content of QIcon "name" prop if (iconName.startsWith('vn:')) {
// your custom approach, the following
// is just an example:
if (iconName.startsWith('vn:') === true) {
// we strip the "app:" part
const name = iconName.substring(3); const name = iconName.substring(3);
return { return {
cls: 'icon-' + name, cls: `icon-${name}`,
}; };
} }
}; };