sel-popup.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <div class="sel-popup">
  3. <bottom-popup class="popup-wrap" :show="show" @close="close">
  4. <app-close @close="close" />
  5. <div class="tui-popup-box">
  6. <image :src="getCover" mode="aspectFit" style="height:550upx"></image>
  7. </div>
  8. </bottom-popup>
  9. </div>
  10. </template>
  11. <script>
  12. import BottomPopup from "@/components/plugin/bottom-popup";
  13. import NumberBox from "@/components/plugin/number-box";
  14. import AppClose from "@/components/module/app-close";
  15. export default {
  16. name: "sel-popup",
  17. components: {
  18. BottomPopup,
  19. NumberBox,
  20. AppClose
  21. },
  22. props: {
  23. // 信息
  24. info: {
  25. type: Object,
  26. default: () => {
  27. return {};
  28. }
  29. },
  30. buyNum: {
  31. type: Number,
  32. default: 1
  33. },
  34. show: {
  35. type: Boolean,
  36. default: true
  37. }
  38. },
  39. data() {
  40. return {
  41. selIndex: 0
  42. };
  43. },
  44. computed: {
  45. getCover() {
  46. if (!this.$util.isEmpty(this.info)) {
  47. return this.info.bigCover;
  48. }
  49. }
  50. },
  51. methods: {
  52. change(e) {
  53. this.$emit("change", e);
  54. },
  55. close() {
  56. this.$emit("close");
  57. },
  58. changeStyleFn(index) {
  59. this.selIndex = index;
  60. }
  61. }
  62. };
  63. </script>
  64. <style lang="scss" scoped>
  65. ::v-deep.popup-wrap {
  66. .tui-popup-class {
  67. border-top-left-radius: 24upx;
  68. border-top-right-radius: 24upx;
  69. // 适配iphoneX
  70. padding-bottom: env(safe-area-inset-bottom);
  71. }
  72. .tui-popup-box {
  73. padding: 80upx 10upx 30upx;
  74. }
  75. .tui-popup-btn {
  76. width: 100%;
  77. position: absolute;
  78. left: 0;
  79. bottom: 0;
  80. padding: 14upx 0;
  81. @include disFlex(center, center);
  82. border-top: 1px solid $borderColor;
  83. .button-com {
  84. width: 80%;
  85. font-size: 32upx;
  86. }
  87. }
  88. .tui-product-box {
  89. display: flex;
  90. align-items: center;
  91. font-size: 24upx;
  92. padding-bottom: 30upx;
  93. }
  94. .tui-popup-img {
  95. height: 200upx;
  96. width: 200upx;
  97. border-radius: 24upx;
  98. display: block;
  99. }
  100. .tui-popup-price {
  101. padding-left: 20upx;
  102. padding-bottom: 8upx;
  103. .goods-tit {
  104. margin-bottom: 75upx;
  105. }
  106. }
  107. .tui-amount {
  108. color: #ff201f;
  109. font-size: 36upx;
  110. }
  111. .tui-popup-scroll {
  112. max-height: 380upx;
  113. font-size: 26upx;
  114. }
  115. .tui-scrollview-box {
  116. padding: 0 30upx 60upx 30upx;
  117. box-sizing: border-box;
  118. }
  119. .tui-attr-title {
  120. padding: 10upx 0;
  121. color: #333;
  122. }
  123. .tui-attr-box {
  124. font-size: 0;
  125. padding: 20upx 0;
  126. }
  127. .tui-attr-item {
  128. max-width: 100%;
  129. min-width: 200upx;
  130. height: 64upx;
  131. display: -webkit-inline-flex;
  132. display: inline-flex;
  133. align-items: center;
  134. justify-content: center;
  135. background: #f7f7f7;
  136. padding: 0 26upx;
  137. box-sizing: border-box;
  138. border-radius: 32upx;
  139. margin-right: 20upx;
  140. margin-bottom: 20upx;
  141. font-size: 26upx;
  142. }
  143. .tui-attr-active {
  144. background: #fcedea !important;
  145. color: #e41f19;
  146. font-weight: bold;
  147. position: relative;
  148. }
  149. .tui-attr-active::after {
  150. content: "";
  151. position: absolute;
  152. border: 1upx solid #e41f19;
  153. width: 100%;
  154. height: 100%;
  155. border-radius: 40upx;
  156. left: 0;
  157. top: 0;
  158. }
  159. .tui-number-box {
  160. display: flex;
  161. align-items: center;
  162. justify-content: space-between;
  163. padding: 20upx 0 30upx 0;
  164. box-sizing: border-box;
  165. }
  166. }
  167. </style>