铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.4 KiB

4 months ago
  1. <template>
  2. <view @click="$emit('confirm')" :style="{
  3. position: 'fixed',
  4. display: 'flex',
  5. justifyContent: 'center',
  6. alignItems: 'center',
  7. width: '100vw',
  8. bottom: bottom
  9. }">
  10. <button :style="{
  11. color: color,
  12. backgroundColor: backgroundColor,
  13. fontSize: fontSize,
  14. width: width,
  15. height: height,
  16. borderRadius: borderRadius
  17. }">
  18. {{ text }}
  19. </button>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. color: {
  26. default: '#000000' // 设置默认颜色值
  27. },
  28. backgroundColor: {
  29. default: '#FFFFFF' // 设置默认背景颜色
  30. },
  31. fontSize: {
  32. default: '36rpx' // 设置默认字体大小
  33. },
  34. text: {
  35. default: '按钮' // 设置默认文本内容
  36. },
  37. width: {
  38. default: '150rpx' // 设置默认宽度
  39. },
  40. height: {
  41. default: '60rpx' // 设置默认高度
  42. },
  43. borderRadius: {
  44. default: '40rpx' // 设置默认高度
  45. },
  46. bottom: {
  47. default: '40rpx' // 设置默认距离底部高度
  48. },
  49. },
  50. data() {
  51. return {
  52. }
  53. },
  54. methods: {
  55. }
  56. }
  57. </script>
  58. <style scoped lang="less">
  59. // .container {
  60. // position: fixed;
  61. // display: flex;
  62. // justify-content: center;
  63. // /* 水平居中 */
  64. // align-items: center;
  65. // /* 垂直居中 */
  66. // width: 100%;
  67. // /* 使容器宽度覆盖整个屏幕 */
  68. // }
  69. button {
  70. display: flex;
  71. justify-content: center;
  72. align-items: center;
  73. }
  74. </style>