NicknamePopup.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <uv-popup ref="popup" mode="bottom" bgColor="none">
  3. <view class="heard">
  4. <slot name="heard"></slot>
  5. <text class="title" v-if="title">{{ title }}</text>
  6. </view>
  7. <view v-if="subtitle" class="subtitle">{{ subtitle }}</view>
  8. <view class="content">
  9. <slot name="content"></slot>
  10. </view>
  11. <image class="close" src="@/static/icon/wd_icon_guanbi.png" @click="close()"></image>
  12. <view class="bottomCompatibility"></view>
  13. </uv-popup>
  14. </template>
  15. <script>
  16. import uvPopup from '@/uni_modules/uv-popup/components/uv-popup/uv-popup.vue'
  17. export default {
  18. name: 'NicknamePopup',
  19. components: {
  20. uvPopup
  21. },
  22. props: {
  23. title: {
  24. type: String,
  25. default: ''
  26. },
  27. subtitle: {
  28. type: String,
  29. default: ''
  30. }
  31. },
  32. methods: {
  33. open() {
  34. this.$refs.popup.open();
  35. },
  36. close() {
  37. this.$refs.popup.close();
  38. }
  39. }
  40. }
  41. </script>
  42. <style scoped lang="scss">
  43. /* 添加样式 */
  44. .bottomCompatibility {
  45. height: --window-bottom;
  46. }
  47. .subtitle {
  48. font-family: 'PingFang SC-Medium';
  49. color: #999;
  50. font-size: 24rpx;
  51. font-weight: 400;
  52. text-align: center;
  53. padding-top: 18rpx;
  54. }
  55. ::v-deep.uv-popup .uv-popup__content {
  56. border-radius: 28rpx 28rpx 0 0;
  57. min-height: 400rpx;
  58. background: url("../../static/me/wd_bg_jianjie.png") center top/100% auto no-repeat, #fff !important;
  59. padding-bottom: 40rpx;
  60. }
  61. .heard {
  62. padding-top: 28rpx;
  63. height: 72rpx;
  64. display: flex;
  65. align-items: center;
  66. justify-content: center;
  67. .title {
  68. font-size: 36rpx;
  69. font-weight: 700;
  70. font-family: 'Alimama ShuHeiTi-Bold';
  71. color: #1F1F1F;
  72. }
  73. }
  74. .close {
  75. position: absolute;
  76. right: 44rpx;
  77. top: 36rpx;
  78. width: 40rpx;
  79. height: 40rpx;
  80. border-radius: 50%;
  81. }
  82. ::v-deep.content .btn-box {
  83. background: #1F1F1F;
  84. border-radius: 76rpx;
  85. color: #fff;
  86. margin: 0 auto;
  87. width: 626rpx;
  88. height:88rpx;
  89. display: flex;
  90. align-items: center;
  91. justify-content: center;
  92. }
  93. .content{
  94. margin-top: 32rpx;
  95. }
  96. </style>