main-button.vue 853 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div :style='`width:${width}px`' class="flex flex-center mr-10 mt-5 font-12 main pointer">
  3. <el-icon v-if="type === '1'" class="mr-5" color="#E9A956">
  4. <component :is="icon"></component>
  5. </el-icon>
  6. <div class="nowrap bold" style="color: #707070"> {{ title }}</div>
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. name: 'main-button',
  12. props: {
  13. title: {
  14. type: String,
  15. default: '项目详情'
  16. },
  17. type: {
  18. type: String,
  19. default: '1'
  20. },
  21. icon: {
  22. type: String,
  23. default: ''
  24. },
  25. width: {
  26. type: Number,
  27. default: 100
  28. }
  29. },
  30. methods: {
  31. click () {
  32. this.$emit('click')
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. .main {
  39. border-radius: 20px;
  40. border: 1px solid #AB7630;
  41. color: #ECAB56;
  42. height: 32px;
  43. line-height: 34px
  44. }
  45. </style>