icon.js 1010 B

12345678910111213141516171819202122232425262728293031
  1. import { boot } from 'quasar/wrappers'
  2. export default boot(({ app, store, router }) => {
  3. app.config.globalProperties.$q.iconMapFn = (iconName) => {
  4. if (iconName.startsWith('isax:') === true) {
  5. const name = iconName.substring(5)
  6. return {
  7. cls: 'isax isax-' + name
  8. }
  9. }
  10. // if (iconName.startsWith('fa:') === true) {
  11. // const name = iconName.substring(3)
  12. // return {
  13. // cls: 'fa fa-' + name
  14. // }
  15. // }
  16. // else if (iconName.startsWith('isax-svg:') === true) {
  17. // const name = iconName.substring(9)
  18. // return {
  19. // // iconName: 'img:/assets/icons/Iconsax/svg/linear/3d-cube-scan.svg',
  20. // icon: 'img:/iconsax-svg/svg/linear/' + name + '.svg'
  21. // // cls: 'img:/iconsax-svg/svg/linear/3d-cube-scan.svg',
  22. // // img: true
  23. // // src: '/assets/icons/Iconsax/svg/linear/3d-cube-scan.svg'
  24. // // content: '<img src="img:/iconsax-svg/svg/linear/3d-cube-scan.svg" />'
  25. // }
  26. // }
  27. }
  28. })