You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

select-car.vue 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="selectCar-box">
  3. <view class="item" v-for="(item,i) in list" :key="i">
  4. <view class="iten-left">
  5. <image :src="`${$imgUrl}che.png`" mode="aspectFill"></image>
  6. <text>{{item.name}}</text>
  7. </view>
  8. <view class="choose-item" @click="choose(i,item)">
  9. <view class="active" v-if="flag==i">
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script lang="ts" setup>
  16. import {reactive,ref} from"vue"
  17. import {navTo} from "@/utils/utils"
  18. const list=reactive([
  19. {name:"A12345"},
  20. {name:"B12345"},
  21. {name:"C12345"},
  22. ])
  23. const flag=ref('0')
  24. const choose=(i,item)=>{
  25. flag.value=i
  26. console.log("选择得数据",item);
  27. navTo('/subpackage/after-sale/card-deactivation-activation/deactivation-activation-confirm')
  28. }
  29. </script>
  30. <style>
  31. page {
  32. width: 100%;
  33. height: 100%;
  34. background-color: #EEF7F7;
  35. }
  36. </style>
  37. <style lang="scss" scoped>
  38. .selectCar-box {
  39. // width: 100%;
  40. height: 100%;
  41. padding: 30rpx;
  42. .item {
  43. padding: 20rpx;
  44. display: flex;
  45. justify-content: space-between;
  46. align-items: center;
  47. height: 240rpx;
  48. background: #FFFFFF;
  49. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  50. border-radius: 20rpx;
  51. margin-bottom: 30rpx;
  52. .iten-left {
  53. display: flex;
  54. align-items: center;
  55. image {
  56. width: 150rpx;
  57. height: 90rpx;
  58. }
  59. text {
  60. margin-left: 20rpx;
  61. font-size: 32rpx;
  62. font-family: Noto Sans S Chinese;
  63. font-weight: 400;
  64. color: #333333;
  65. }
  66. }
  67. .choose-item{
  68. width: 44rpx;
  69. height: 44rpx;
  70. background: #FFFFFF;
  71. border: 2rpx solid #00B38B;
  72. border-radius: 50%;
  73. margin-right: 20rpx;
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. box-sizing: content-box;
  78. }
  79. .active{
  80. width: 34rpx;
  81. height: 34rpx;
  82. background: #00B38B;
  83. border-radius: 50%;
  84. }
  85. }
  86. }
  87. </style>