fr-icon-open.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <fr-svg @click="onClick" :uuid="`fr-icon-open-${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="M27.9467 16.8281L40.7568 7.73711C41.6731 7.08684 42.9535 7.40693 43.4559 8.4119C43.7856 9.07125 43.688 9.86396 43.2083 10.4237L41 13L35.7241 20.0345C35.2788 20.6283 35.1989 21.4199 35.5166 22.0907L42.6471 37.1438C43.2756 38.4707 42.3078 40 40.8396 40H32.6363C31.6844 40 30.8645 39.3291 30.676 38.3961L27.5197 22.7739L27.1139 18.6553C27.0435 17.9409 27.3613 17.2436 27.9467 16.8281Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M28 23L35 21" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M19.9359 17.1028L7.20861 8.19574C6.30625 7.56424 5.05387 7.87714 4.55456 8.85884C4.21946 9.51768 4.31813 10.314 4.8039 10.8711L7 13.3898L12.2323 20.0262C12.7026 20.6227 12.7943 21.4342 12.4692 22.1207L5.35292 37.1438C4.7244 38.4707 5.69217 40 7.1604 40H15.322C16.2925 40 17.1229 39.3033 17.2916 38.3476L20 23L20.7526 19.1224C20.903 18.347 20.5831 17.5557 19.9359 17.1028Z" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/><path d="M13 21L20 23" stroke="${this.colors(0)}" stroke-width="${this.strokeWidth}" stroke-linecap="${this.strokeLinecap}" stroke-linejoin="${this.strokeLinejoin}"/></svg>`
  32. }
  33. }
  34. }
  35. </script>