procurement-btn.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <button class="pro-btn" :style="{
  3. width,
  4. height,
  5. background,
  6. color,
  7. fontSize,
  8. borderRadius: border ? borderRadius : '',
  9. lineHeight: height
  10. }">
  11. <span><slot></slot></span>
  12. </button>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. border: {
  18. type: Boolean,
  19. default: () => true
  20. },
  21. width: {
  22. type: String,
  23. default: () => '280rpx'
  24. },
  25. height: {
  26. type: String,
  27. default: () => '84rpx'
  28. },
  29. background: {
  30. type: String,
  31. default: () => '#FFF4E6'
  32. },
  33. color: {
  34. type: String,
  35. default: () => '#F3B574'
  36. },
  37. fontSize: {
  38. type: String,
  39. default: () => '32rpx'
  40. },
  41. borderRadius: {
  42. type: String,
  43. default: () => '45rpx'
  44. },
  45. }
  46. }
  47. </script>
  48. <style scoped lang="scss">
  49. .pro-btn {
  50. display: inline-block;/*变为行内块:*/
  51. line-height: 1;
  52. white-space: nowrap;/*规定段落中的文本不进行换行:*/
  53. cursor: pointer;
  54. text-align: center;
  55. }
  56. </style>