酒店桌布为微信小程序
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.

72 lines
1.2 KiB

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