show-modal.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="pop flexCC" v-if="showPop">
  3. <view class="pop_con">
  4. <image src="../static/imgs/shop/hint_icon.png" class="hint_icon"></image>
  5. <view class="title">{{hint}}</view>
  6. <view class="con" :style="{color}">
  7. {{content}}
  8. </view>
  9. <view class="btn_box flexB">
  10. <view @click.stop="cancel" class="flexC">{{cancelText}}</view>
  11. <view @click.stop="confirm" class="flexC">{{confirmText}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: "hint-pop",
  19. props: {
  20. showPop: {
  21. type: Boolean,
  22. default: false
  23. },
  24. content: {
  25. type: String,
  26. default: '该收货人有多个未发货订单,是否一起发货?'
  27. },
  28. cancelText: {
  29. type: String,
  30. default: '不一起发货'
  31. },
  32. confirmText: {
  33. type: String,
  34. default: '一起发货'
  35. },
  36. hint: {
  37. type: String,
  38. default: '温馨提醒'
  39. },
  40. color: {
  41. type: String,
  42. default: '#333'
  43. }
  44. },
  45. data() {
  46. return {
  47. };
  48. },
  49. methods: {
  50. cancel() {
  51. this.$emit('cancel');
  52. },
  53. confirm() {
  54. this.$emit('confirm');
  55. },
  56. }
  57. }
  58. </script>
  59. <style lang="scss">
  60. .pop {
  61. width: 100%;
  62. height: 100vh;
  63. position: fixed;
  64. top: 0;
  65. left: 0;
  66. background-color: rgba(0, 0, 0, 0.7);
  67. z-index: 999;
  68. .hint_icon {
  69. width: 183rpx;
  70. height: 135rpx;
  71. position: relative;
  72. margin-top: -85rpx;
  73. }
  74. .pop_con {
  75. width: 648rpx;
  76. height: 442rpx;
  77. background: #fff;
  78. border-radius: 26rpx;
  79. display: flex;
  80. flex-direction: column;
  81. align-items: center;
  82. padding: 0 30rpx;
  83. box-sizing: border-box;
  84. .title {
  85. font-size: 36rpx;
  86. font-weight: bold;
  87. margin-top: 22rpx;
  88. }
  89. .con {
  90. min-height: 150rpx;
  91. margin: 20rpx 0 20rpx;
  92. font-size: 34rpx;
  93. }
  94. .btn_box {
  95. width: 100%;
  96. view {
  97. width: 270rpx;
  98. height: 88rpx;
  99. background: #FFF4F3;
  100. border: 2rpx solid #FB231F;
  101. border-radius: 44rpx;
  102. color: $base-color;
  103. font-size: 32rpx;
  104. }
  105. view:last-child {
  106. background: $base-line-bg;
  107. color: #fff;
  108. }
  109. }
  110. }
  111. .iconfont {
  112. color: #fff;
  113. font-size: 60rpx;
  114. margin-top: 30rpx;
  115. }
  116. }
  117. </style>