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

93 lines
1.5 KiB

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">
  21. 取消
  22. </view>
  23. <view class="btn">
  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. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .toast{
  53. width: 500rpx;
  54. .title{
  55. min-height: 70rpx;
  56. display: flex;
  57. justify-content: center;
  58. align-items: center;
  59. font-size: 32rpx;
  60. }
  61. .content{
  62. // min-height: 300rpx;
  63. }
  64. .btns{
  65. display: flex;
  66. padding: 30rpx;
  67. .btn{
  68. flex: 1;
  69. background: $uni-linear-gradient-btn-color;
  70. border-radius: 20rpx;
  71. color: #fff;
  72. padding: 20rpx 0;
  73. text-align: center;
  74. }
  75. }
  76. .btnstwo{
  77. display: flex;
  78. .btn{
  79. flex: 1;
  80. background: $uni-linear-gradient-btn-color;
  81. color: #fff;
  82. padding: 20rpx 0;
  83. text-align: center;
  84. }
  85. .c{
  86. background: #fff;
  87. border-top: 1px solid #999;
  88. color: #333;
  89. }
  90. }
  91. }
  92. </style>