帧视界壹通告,付费看视频的微信小程序
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.

105 lines
1.7 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <uv-popup :safeAreaInsetBottom="false" :round="round" ref="popup">
  3. <view class="toast">
  4. <view class="title">
  5. {{ title }}
  6. </view>
  7. <view class="content">
  8. <slot></slot>
  9. </view>
  10. <view class="btns" v-if="!cancel">
  11. <view class="btn" @click="$emit('confirm')">
  12. {{ confirmText }}
  13. </view>
  14. </view>
  15. <view class="btnstwo" v-else>
  16. <view class="btn c" @click="$emit('cancel')">
  17. {{ cancelText }}
  18. </view>
  19. <view class="btn" @click="$emit('confirm')">
  20. {{ confirmText }}
  21. </view>
  22. </view>
  23. </view>
  24. </uv-popup>
  25. </template>
  26. <script>
  27. export default {
  28. name: 'toast',
  29. props: {
  30. title: {
  31. default: ''
  32. },
  33. confirmText: {
  34. default: '确认'
  35. },
  36. cancel: {
  37. default: false
  38. },
  39. cancelText: {
  40. default: '取消'
  41. },
  42. round: {
  43. default: '40rpx'
  44. }
  45. },
  46. methods: {
  47. open() {
  48. this.$refs.popup.open();
  49. },
  50. close() {
  51. this.$refs.popup.close();
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .toast {
  58. min-width: 500rpx;
  59. .title {
  60. min-height: 70rpx;
  61. display: flex;
  62. justify-content: center;
  63. align-items: center;
  64. font-size: 32rpx;
  65. }
  66. .content {
  67. // min-height: 300rpx;
  68. }
  69. .btns {
  70. display: flex;
  71. padding: 30rpx;
  72. .btn {
  73. flex: 1;
  74. background: $uni-linear-gradient-btn-color;
  75. border-radius: 20rpx;
  76. color: #fff;
  77. padding: 20rpx 0;
  78. text-align: center;
  79. }
  80. }
  81. .btnstwo {
  82. display: flex;
  83. .btn {
  84. flex: 1;
  85. background: $uni-linear-gradient-btn-color;
  86. color: #fff;
  87. padding: 20rpx 0;
  88. text-align: center;
  89. }
  90. .c {
  91. background: #fff;
  92. border-top: 1px solid #999;
  93. color: #333;
  94. }
  95. }
  96. }
  97. </style>