CustomPop.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <div class="del_pop" v-if="popShow">
  3. <div class="del_content">
  4. <div class="d_icon">
  5. <slot name="header-image">
  6. </slot>
  7. </div>
  8. <div class="con_border">
  9. <div class="tip_title">
  10. 温馨提醒
  11. </div>
  12. <div class="text">
  13. <slot name="content">您确定删除本条地址吗?</slot>
  14. </div>
  15. <div class="del_btn">
  16. <div class="cancel" v-if="showCancel" @click="handleCancel">取消</div>
  17. <div class="sure" @click="handleSure">确定</div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <!-- <div>u-popup</div> -->
  23. </template>
  24. <script>
  25. export default {
  26. name: "CustomPop",
  27. props:{
  28. showCancel:{
  29. type:Boolean,
  30. default:true,
  31. }
  32. },
  33. data() {
  34. return {
  35. popShow: false
  36. };
  37. },
  38. methods: {
  39. showEdit() {
  40. this.popShow = true
  41. },
  42. handleCancel() {
  43. this.$emit('cancel', '用户点击了取消')
  44. this.popShow = false
  45. },
  46. handleSure() {
  47. this.$emit("sure", '用户点击了确定')
  48. this.popShow = false
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss">
  54. .del_pop {
  55. height: 100vh;
  56. width: 100vw;
  57. background-color: rgba(0, 0, 0, 0.6);
  58. position: fixed;
  59. top: 0;
  60. left: 0;
  61. display: flex;
  62. justify-content: center;
  63. z-index:999;
  64. align-items: center;
  65. .del_content {
  66. position: relative;
  67. // height: 200px;
  68. padding: 34px 0 10px;
  69. width: 324px;
  70. background-color: #fff;
  71. display: flex;
  72. justify-content: center;
  73. border-radius: 12px;
  74. .d_icon {
  75. position: absolute;
  76. top: -34px;
  77. width: 91px;
  78. height: 68px;
  79. image {
  80. width: 91px;
  81. height: 68px;
  82. }
  83. }
  84. .con_border {
  85. margin: 0 20px;
  86. padding-bottom: 20px;
  87. width: 100%;
  88. .tip_title {
  89. text-align: center;
  90. padding: 16px 0;
  91. font-size: 19px;
  92. color: #333333;
  93. }
  94. .text {
  95. font-size: 17px;
  96. text-align: center;
  97. color: #333333;
  98. }
  99. .del_btn {
  100. margin-top: 24px;
  101. display: flex;
  102. justify-content: space-between;
  103. align-items: center;
  104. text-align: center;
  105. font-size: 16px;
  106. .cancel {
  107. flex: 1;
  108. border-radius: 22px;
  109. opacity: 1;
  110. background: #F5F5F5;
  111. height: 44px;
  112. line-height: 44px;
  113. margin-right: 20px;
  114. color: #333333;
  115. }
  116. .sure {
  117. flex: 1;
  118. border-radius: 22px;
  119. opacity: 1;
  120. background: linear-gradient(91deg, #F30000 1%, #FE4815 99%);
  121. height: 44px;
  122. letter-spacing: 0em;
  123. color: #FFFFFF;
  124. line-height: 44px;
  125. }
  126. }
  127. }
  128. }
  129. }
  130. </style>