fxyk-button.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <u-button
  3. :style="buttonStyle"
  4. hover-class="none"
  5. :class="{'custom-style': !isLoginButton,
  6. 'login-style': isLoginButton}"
  7. :hair-line="false">
  8. {{ content }}
  9. </u-button>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. // 内容
  15. content: {
  16. type: String,
  17. default: ''
  18. },
  19. // 宽度
  20. width: {
  21. type: String,
  22. default: '583'
  23. },
  24. // 高度
  25. height: {
  26. type: String,
  27. default: '83'
  28. },
  29. // 背景颜色
  30. bgColor: {
  31. type: String,
  32. default: '#42349A'
  33. },
  34. // 是否为登录按钮 登录按钮文字样式 和其他不一样
  35. isLoginButton: {
  36. type: Boolean,
  37. default: false
  38. }
  39. },
  40. computed: {
  41. buttonStyle() {
  42. return {'width': this.width + 'rpx',
  43. 'height': this.height + 'rpx',
  44. 'background-color': this.bgColor}
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .custom-style {
  51. font-size: 33rpx;
  52. font-family: SimSun;
  53. font-weight: 400;
  54. line-height: 44rpx;
  55. color: #FFFFFF;
  56. border: none!important;
  57. }
  58. .login-style {
  59. font-size: 42rpx;
  60. font-family: Segoe UI;
  61. font-weight: 400;
  62. line-height: 56rpx;
  63. color: #FFFFFF;
  64. border: none!important;
  65. }
  66. </style>