attr.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="select_popup_container">
  3. <view class="popup_title">
  4. <navigator :url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`" hover-class="none" class="manage_btn">管理</navigator>
  5. <view class="popup_title_msn">{{title}}</view>
  6. <view class="close" @click="close"><text class="iconfont">&#xe761;</text></view>
  7. </view>
  8. <view class="content">
  9. <scroll-view scroll-y="true" class="popup_sroll" @scrolltolower="scrolltolower">
  10. <view class="content_list">
  11. <view v-for="(item, index) in attrList" :key="index" class="content_list_item">
  12. <view @click="selectItem(item)">{{ item.template_name }}</view>
  13. </view>
  14. </view>
  15. </scroll-view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. // +----------------------------------------------------------------------
  21. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  22. // +----------------------------------------------------------------------
  23. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  24. // +----------------------------------------------------------------------
  25. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  26. // +----------------------------------------------------------------------
  27. // | Author: CRMEB Team <admin@crmeb.com>
  28. // +----------------------------------------------------------------------
  29. export default {
  30. props: {
  31. attrList: {
  32. type: Array,
  33. default() {
  34. return []
  35. }
  36. },
  37. title: {
  38. type: String,
  39. default: '请选择规格'
  40. },
  41. mer_id: {
  42. type: String || Number,
  43. default: 0
  44. }
  45. },
  46. data() {
  47. return {}
  48. },
  49. methods: {
  50. close(){
  51. this.$emit('close');
  52. },
  53. selectItem(item) {
  54. this.$emit('selectAttr', item);
  55. },
  56. scrolltolower() {
  57. this.$emit('scrolltolower');
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .select_popup_container {
  64. background: #fff;
  65. border-radius: 16rpx 16rpx 0 0;
  66. }
  67. .popup_title {
  68. display: flex;
  69. justify-content: flex-end;
  70. padding: 36rpx 30rpx;
  71. position: relative;
  72. &_msn {
  73. position: absolute;
  74. top: 50%;
  75. left: 50%;
  76. transform: translate(-50%, -50%);
  77. color: #282828;
  78. font-size: 32rpx;
  79. font-weight: bold;
  80. }
  81. .manage_btn{
  82. font-weight: normal;
  83. color: #e93323;
  84. font-size: 24rpx;
  85. position: absolute;
  86. left: 40rpx;
  87. top: 40rpx;
  88. }
  89. .close {
  90. position: relative;
  91. z-index: 10;
  92. font-size: 28rpx;
  93. color: #8a8a8a;
  94. }
  95. }
  96. .content {
  97. .popup_sroll {
  98. max-height: 742rpx;
  99. min-height: 300rpx;
  100. }
  101. &_list {
  102. &_item {
  103. color: #333333;
  104. margin-bottom: 50rpx;
  105. margin-left: 40rpx;
  106. margin-right: 40rpx;
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. > view {
  111. flex: 0.6;
  112. }
  113. > view:nth-child(2) {
  114. flex: 0.4;
  115. display: flex;
  116. justify-content: flex-end;
  117. }
  118. .iconfont {
  119. color: #e93323;
  120. font-size: 36rpx !important;
  121. }
  122. }
  123. }
  124. }
  125. </style>