task-bottom-btn.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="task-bottom-btn" :style="{'height': paddTop + bottomBoxH +'rpx'}">
  3. <view class="bottom-btn-box"
  4. :style="{'backgroundColor':pageBgc , 'height': paddTop + bottomBoxH +'rpx' , paddingTop:paddTop +'rpx' }">
  5. <view class="bottom-bgn-bg" :style="{'backgroundColor':bgColor, 'height': bottomBoxH +'rpx' , }">
  6. <view class="bottom-btn" @click.stop="onClick()" :style="{'background': btnColor}">
  7. {{btnName}}
  8. </view>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. pageBgc: {
  17. type: String,
  18. default: 'transparent',
  19. },
  20. bgColor: {
  21. type: String,
  22. default: '#fff',
  23. },
  24. btnColor: {
  25. type: String,
  26. default: ''
  27. },
  28. paddTop: {
  29. type: Number,
  30. default: 0,
  31. },
  32. btnName: {
  33. type: String,
  34. default: '',
  35. required: true
  36. }
  37. },
  38. data() {
  39. return {
  40. bottomBoxH: 148
  41. }
  42. },
  43. methods: {
  44. onClick() {
  45. this.$emit('onClick')
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .task-bottom-btn {
  52. width: 100%;
  53. .bottom-btn-box {
  54. position: fixed;
  55. left: 0;
  56. right: 0;
  57. bottom: 0;
  58. .bottom-bgn-bg {
  59. display: flex;
  60. justify-content: center;
  61. align-items: center;
  62. width: 100%;
  63. }
  64. .bottom-btn {
  65. width: 690rpx;
  66. height: 80rpx;
  67. background: linear-gradient(92deg, #3cb7d2 2%, #44c5d5 98%);
  68. border-radius: 40rpx;
  69. font-size: 32rpx;
  70. font-weight: Regular;
  71. text-align: center;
  72. color: #ffffff;
  73. line-height: 80rpx;
  74. }
  75. }
  76. }
  77. </style>