archives.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title="我的档案" bgColor="#FFFFFF"></cus-header>
  4. <div class="member">
  5. <scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation="true" :scroll-left="scrollLeft">
  6. <view class="scroll-view-item_H" :id="'svih_'+index" v-for="(item,index) in memberList" :key="index" @tap="changeMember(item,index)">
  7. <view class="cl_item" :class="{'active':midx===index}">
  8. <text>{{item.name}}</text>
  9. </view>
  10. </view>
  11. </scroll-view>
  12. </div>
  13. <div class="list">
  14. <up-list @scrolltolower="scrolltolower" style="height: 100%;">
  15. <up-list-item v-for="(item, index) in list" :key="index">
  16. <ArchivesBox></ArchivesBox>
  17. </up-list-item>
  18. </up-list>
  19. <ArchivesBox v-for="(item,index) in list" :key="index"></ArchivesBox>
  20. </div>
  21. </view>
  22. </template>
  23. <script setup name="">
  24. import CusHeader from '@/components/CusHeader/index.vue'
  25. import ArchivesBox from '@/components/pages/archivesBox/index.vue'
  26. import { ref } from 'vue'
  27. const midx = ref(0)
  28. const scrollLeft = ref(0)
  29. const memberList = ref([
  30. {id:1,name:'张三'},
  31. {id:2,name:'李四'},
  32. {id:3,name:'龙傲天'}
  33. ])
  34. const list = ref([1,1,1,1,1])
  35. const changeMember = (item,index) => {
  36. midx.value = index;
  37. }
  38. </script>
  39. <style scoped lang="scss">
  40. .scroll-view_H {
  41. white-space: nowrap;
  42. width: 100%;
  43. }
  44. .scroll-view-item_H {
  45. display: inline-block;
  46. height: 100%;
  47. margin-left: 30rpx;
  48. &:first-child{
  49. margin-left: 0;
  50. }
  51. }
  52. .common_page{
  53. padding: 0 0 40rpx;
  54. box-sizing: border-box;
  55. .member{
  56. width: 100%;
  57. height: 56rpx;
  58. padding: 0 30rpx;
  59. margin-top: 20rpx;
  60. box-sizing: border-box;
  61. .cl_item{
  62. padding: 0 26rpx;
  63. height: 56rpx;
  64. background: #FFFFFF;
  65. border-radius: 10rpx;
  66. font-family: PingFangSC, PingFang SC;
  67. font-weight: 400;
  68. font-size: 26rpx;
  69. color: #252525;
  70. line-height: 56rpx;
  71. text-align: center;
  72. &.active{
  73. background: #B7F358;
  74. }
  75. }
  76. }
  77. .list{
  78. padding: 0 24rpx;
  79. flex: 1;
  80. overflow-y: auto;
  81. margin-top: 4rpx;
  82. }
  83. }
  84. </style>