fr-icon-scallion.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <fr-svg @click="onClick" :uuid="`fr-icon-scallion-${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"><g clip-path="url(#icon-49ba014a368a3cac)"><path d="M20.0001 23.9999C20.0001 23.9999 22.4996 19.4999 22.9996 14.9999C23.4996 10.4999 21.9997 6.99993 21.9997 6.99993L27 3.99992C27 3.99992 27.9992 9.99993 27.9992 12.9999" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M5.99994 42.9999C3.9995 41.4999 4.00123 36.0894 8.00047 32.9999C11.9997 29.9104 12.1858 30.7172 17 26.9999C21.8142 23.2826 34 3.99991 34 3.99991L38.5001 7.49992L26.3104 23.7401C23.3258 27.7165 22.5516 33.0528 20.0508 37.3501C18.1011 40.7002 15.9999 41.9999 13.9999 42.9999C11.9999 43.9999 8.00037 44.4999 5.99994 42.9999Z" fill="${this.colors(1)}" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M23.0001 30C23.0001 30 25.9999 28 29.9998 26C33.9998 24 43 24 43 24L40 17C40 17 31.9996 17 29.0001 20" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/></g><defs><clipPath id="icon-49ba014a368a3cac"><rect width="48" height="48" fill="${this.colors(2)}"/></clipPath></defs></svg>`
  32. }
  33. }
  34. }
  35. </script>