uni-popup-list.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view class="uni-popup-share">
  3. <view class="uni-share-title"><text class="uni-share-title-text">{{title}}</text></view>
  4. <view class="uni-share-content">
  5. <view class="uni-list-content-box">
  6. <view class="uni-list-content-item" v-if="bottomData.length" v-for="(item,index) in bottomData" :key="index" @click.stop="select(index,item)">
  7. <view class="list-left">
  8. <view class="uni-list-imgview">
  9. <image class="uni-list-image" :src="item.icon" mode="aspectFill"></image>
  10. </view>
  11. <view class="uni-list-info">
  12. <text class="uni-list-text">{{item.bank_name}}</text>
  13. <text class="uni-list-text">{{item.bank_info}}</text>
  14. </view>
  15. <view class="content">
  16. <text class="uni-list-content">{{item.account}}</text>
  17. </view>
  18. </view>
  19. <view class="content-img">
  20. <view :class="[selectList == item.id ? 'check-style-unequal-width' : '']" :data-index="index"></view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="uni-share-button-box">
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name: 'UniPopupList',
  32. props: {
  33. title: {
  34. type: String,
  35. default: '请选择渠道'
  36. },
  37. bottomData: {
  38. type: Array,
  39. default:function () {
  40. return [];
  41. }
  42. },
  43. selectIndex:{
  44. type:Number,
  45. default:0
  46. },
  47. selectList:{
  48. type:Number,
  49. default:0
  50. }
  51. },
  52. inject: ['popup'],
  53. data() {
  54. return {
  55. }
  56. },
  57. created() {},
  58. methods: {
  59. /**
  60. * 选择内容
  61. */
  62. select(index,item) {
  63. this.$emit('select', item, () => {
  64. this.popup.close()
  65. })
  66. },
  67. checked(){
  68. },
  69. /**
  70. * 关闭窗口
  71. */
  72. close() {
  73. this.popup.close()
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .list-left{
  80. width: 80%;
  81. display: flex;
  82. flex-direction: row;
  83. justify-content: space-around;
  84. }
  85. .uni-list-imgview{
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. }
  90. .uni-popup-share {
  91. background-color: #fff;
  92. }
  93. .content-img{
  94. width: 20%;
  95. }
  96. .content ,.content-img{
  97. display: flex;
  98. justify-content: center;
  99. align-items: center;
  100. }
  101. .uni-list-info{
  102. display: flex;
  103. flex-direction: column;
  104. justify-content: center;
  105. align-items: center;
  106. }
  107. .uni-share-title {
  108. /* #ifndef APP-NVUE */
  109. display: flex;
  110. /* #endif */
  111. flex-direction: row;
  112. align-items: center;
  113. justify-content: center;
  114. height: 120rpx;
  115. border-bottom: 1px solid #eaeaea;
  116. color: #000000;
  117. }
  118. .uni-share-title-text {
  119. font-size: 14px;
  120. color: #666;
  121. }
  122. .uni-share-content {
  123. /* #ifndef APP-NVUE */
  124. display: flex;
  125. /* #endif */
  126. flex-direction: row;
  127. justify-content: center;
  128. }
  129. .check-style-unequal-width {
  130. width:8px;
  131. height:18px;
  132. border-color:#85b3e7;
  133. border-style:solid;
  134. border-width:0 2px 2px 0;
  135. transform:rotate(45deg);
  136. }
  137. .uni-list-content-box {
  138. /* #ifndef APP-NVUE */
  139. display: flex;
  140. /* #endif */
  141. flex-direction: column;
  142. flex-wrap: nowrap;
  143. width: 100%;
  144. }
  145. .uni-list-content-item {
  146. /* #ifndef APP-NVUE */
  147. display: flex;
  148. /* #endif */
  149. flex-direction: row;
  150. align-items: center;
  151. padding: 20rpx;
  152. border-bottom: 1px solid #eaeaea;
  153. color: #000000;
  154. }
  155. .uni-share-content-item:active {
  156. background-color: #f5f5f5;
  157. }
  158. .uni-list-image {
  159. width: 30px;
  160. height: 30px;
  161. }
  162. .uni-list-text {
  163. font-size: 14px;
  164. color: #3B4144;
  165. }
  166. .uni-share-button-box {
  167. /* #ifndef APP-NVUE */
  168. display: flex;
  169. /* #endif */
  170. flex-direction: row;
  171. padding: 10px 15px;
  172. }
  173. .uni-share-button {
  174. flex: 1;
  175. border-radius: 50px;
  176. color: #666;
  177. font-size: 16px;
  178. }
  179. .uni-share-button::after {
  180. border-radius: 50px;
  181. }
  182. </style>