z-button.vue 475 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view :style="{width:width+'rpx'}" class="z-button" @click="$emit('click')">
  3. <slot></slot>
  4. </view>
  5. </template>
  6. <script>
  7. export default{
  8. name:'z-button',
  9. props:{
  10. width:{
  11. type:String,
  12. value:'690'
  13. }
  14. }
  15. }
  16. </script>
  17. <style lang="scss" scoped>
  18. .z-button{
  19. width:690rpx;
  20. line-height:88rpx;
  21. background:#2481EE;
  22. color: white;
  23. border-radius:6rpx;
  24. margin: 0 auto;
  25. font-size:32rpx;
  26. font-weight:500;
  27. text-align: center;
  28. }
  29. </style>