fr-icon-multi-ring.vue 3.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <fr-svg @click="onClick" :uuid="`fr-icon-multi-ring-${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 《多圆环》图标
  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="M30 10C30 6.68629 27.3137 4 24 4C20.6863 4 18 6.68629 18 10V24C18 27.3137 20.6863 30 24 30C27.3137 30 30 27.3137 30 24V10Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M38.1422 18.3432C40.4853 16.0001 40.4853 12.2011 38.1422 9.85795C35.799 7.5148 32 7.5148 29.6569 9.85795L19.7574 19.7575C17.4142 22.1006 17.4142 25.8996 19.7574 28.2427C22.1005 30.5859 25.8995 30.5859 28.2427 28.2427L38.1422 18.3432Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M38 30C41.3137 30 44 27.3137 44 24C44 20.6863 41.3137 18 38 18H24C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30H38Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M29.6568 38.1421C32 40.4853 35.799 40.4853 38.1421 38.1421C40.4853 35.799 40.4853 32 38.1421 29.6568L28.2426 19.7574C25.8995 17.4142 22.1005 17.4142 19.7573 19.7574C17.4142 22.1005 17.4142 25.8995 19.7573 28.2426L29.6568 38.1421Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M18 38C18 41.3137 20.6863 44 24 44C27.3137 44 30 41.3137 30 38V24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24V38Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M9.85795 29.6569C7.5148 32 7.5148 35.799 9.85795 38.1421C12.2011 40.4853 16.0001 40.4853 18.3432 38.1421L28.2427 28.2426C30.5859 25.8995 30.5859 22.1005 28.2427 19.7574C25.8996 17.4142 22.1006 17.4142 19.7574 19.7574L9.85795 29.6569Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M10 18C6.68629 18 4 20.6863 4 24C4 27.3137 6.68629 30 10 30H24C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18H10Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M18.3433 9.85795C16.0001 7.5148 12.2011 7.5148 9.85794 9.85795C7.5148 12.2011 7.5148 16.0001 9.85795 18.3433L19.7575 28.2427C22.1006 30.5859 25.8996 30.5859 28.2427 28.2427C30.5859 25.8996 30.5859 22.1006 28.2428 19.7575L18.3433 9.85795Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/></svg>`
  32. }
  33. }
  34. }
  35. </script>