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

96 lines
1.6 KiB

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