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