icons.vue 479 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <i :class="`iconfont icon-${type}`" :style="styles"></i>
  3. </template>
  4. <script>
  5. export default {
  6. name: 'Icons',
  7. props: {
  8. type: {
  9. type: String,
  10. required: true
  11. },
  12. color: {
  13. type: String,
  14. default: '#5c6b77'
  15. },
  16. size: {
  17. type: Number,
  18. default: 16
  19. }
  20. },
  21. computed: {
  22. styles () {
  23. return {
  24. fontSize: `${this.size}px`,
  25. color: this.color
  26. }
  27. }
  28. }
  29. }
  30. </script>
  31. <style>
  32. </style>