fr-icon-i-mac.vue 3.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <fr-svg @click="onClick" :uuid="`fr-icon-i-mac-${size}${strokeWidth}${theme}${fill}${strokeLinecap}${strokeLinejoin}`" :width="size" :height="size" :isCache="true" :src="iconSvg" />
  3. </template>
  4. <script>
  5. // #ifdef UNI-APP-X
  6. import icons from "../../mixins/icons.uts";
  7. // #endif
  8. // #ifndef UNI-APP-X
  9. import icons from "../../mixins/icons.js";
  10. // #endif
  11. /**
  12. * @description 《苹果电脑iMac》图标
  13. * @tutorial https://www.flowerui.com/documents/flower-icons/icons.html
  14. * @property {Number} size 图标大小
  15. * @property {Number} strokeWidth 线段粗细
  16. * @property {String} theme 图标大小
  17. * @property {Array} fill 图标颜色,["外部描边颜色","外部填充颜色","内部描边颜色","内部填充颜色"]
  18. * @property {String} strokeLinecap 图标大小
  19. * @property {String} strokeLinejoin 图标大小
  20. * @event {Function} click 图标点击事件
  21. */
  22. export default {
  23. mixins: [icons],
  24. computed: {
  25. // #ifdef UNI-APP-X
  26. iconSvg(): string {
  27. // #endif
  28. // #ifndef UNI-APP-X
  29. iconSvg() {
  30. // #endif
  31. return `<?xml version="1.0" encoding="UTF-8"?><svg width="${this.size}" height="${this.size}" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6H44V28H4V6Z" fill="${this.colors(1)}" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M44 28V36H4V28" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M13.0909 18H10.9091C10.407 18 10 18.407 10 18.9091V21.0909C10 21.593 10.407 22 10.9091 22H13.0909C13.593 22 14 21.593 14 21.0909V18.9091C14 18.407 13.593 18 13.0909 18Z" fill="${this.colors(2)}"/><path d="M13.0909 12H10.9091C10.407 12 10 12.407 10 12.9091V15.0909C10 15.593 10.407 16 10.9091 16H13.0909C13.593 16 14 15.593 14 15.0909V12.9091C14 12.407 13.593 12 13.0909 12Z" fill="${this.colors(2)}"/><path d="M21.0909 18H18.9091C18.407 18 18 18.407 18 18.9091V21.0909C18 21.593 18.407 22 18.9091 22H21.0909C21.593 22 22 21.593 22 21.0909V18.9091C22 18.407 21.593 18 21.0909 18Z" fill="${this.colors(2)}"/><path d="M21.0909 12H18.9091C18.407 12 18 12.407 18 12.9091V15.0909C18 15.593 18.407 16 18.9091 16H21.0909C21.593 16 22 15.593 22 15.0909V12.9091C22 12.407 21.593 12 21.0909 12Z" fill="${this.colors(2)}"/><path d="M29.0909 18H26.9091C26.407 18 26 18.407 26 18.9091V21.0909C26 21.593 26.407 22 26.9091 22H29.0909C29.593 22 30 21.593 30 21.0909V18.9091C30 18.407 29.593 18 29.0909 18Z" fill="${this.colors(2)}"/><path d="M29.0909 12H26.9091C26.407 12 26 12.407 26 12.9091V15.0909C26 15.593 26.407 16 26.9091 16H29.0909C29.593 16 30 15.593 30 15.0909V12.9091C30 12.407 29.593 12 29.0909 12Z" fill="${this.colors(2)}"/><path d="M37.0909 12H34.9091C34.407 12 34 12.407 34 12.9091V15.0909C34 15.593 34.407 16 34.9091 16H37.0909C37.593 16 38 15.593 38 15.0909V12.9091C38 12.407 37.593 12 37.0909 12Z" fill="${this.colors(2)}"/><path d="M20.8462 36L16 42H32L27.1538 36" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/></svg>`
  32. }
  33. }
  34. }
  35. </script>