svg-icons-lib.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. *
  3. * Icon Library for <zui-svg-icon> usage
  4. *
  5. * Auto generated by /tools/generate-svg-icon.js
  6. *
  7. * !!! DO NOT MODIFY MANUALLY !!!
  8. *
  9. * @datetime 2024/7/23 15:42:43
  10. *
  11. */
  12. // == collection start
  13. const collections = {
  14. default: {
  15. "icons": {
  16. "back": [
  17. "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"50\"><path fill=\"#323232\" fill-rule=\"evenodd\" d=\"M48 30c0 11.046-8.954 20-20 20h-8C9.977 50 1.699 42.619.248 33H0V3.5a3.5 3.5 0 1 1 7 0V30h.055c.553 7.634 6.398 13 14.445 13h3C33.06 43 41 39.06 41 30.5c0-7.7-4.814-12.457-12.009-13.338l2.003 2.003a3.414 3.414 0 1 1-4.829 4.829l-8.159-8.159a3.4 3.4 0 0 1-.989-2.531 3.49 3.49 0 0 1 .826-3.597l8.364-8.364a3.5 3.5 0 1 1 4.95 4.95L27.45 10H28c11.046 0 20 8.954 20 20\"/></svg>",
  18. 0
  19. ]
  20. },
  21. "currentColor": "",
  22. "$_colorPalette": [
  23. "#323232"
  24. ]
  25. },
  26. }
  27. // == collection end
  28. const svglib = {}
  29. svglib.registerCollection = (key, lib) => {
  30. if (collections[key]) {
  31. return
  32. }
  33. if (typeof lib.registerCollection === 'function') {
  34. collections[key] = lib.getCollection('default')
  35. } else {
  36. collections[key] = lib
  37. }
  38. }
  39. svglib.getCollection = (key = 'default') => {
  40. if (!collections[key]) throw new Error(`没有找到名为 ${key} 的图标库。`)
  41. return collections[key]
  42. }
  43. export const SvgIconLib = svglib
  44. export default SvgIconLib