index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="card">
  3. <uni-list>
  4. <uni-list-item
  5. v-for="item in list"
  6. :clickable="true"
  7. :key="item.title"
  8. :title="item.title"
  9. :showArrow="item.hideArrow ? false : item.rightTex === '未开放' ? false : true"
  10. :rightText="item.rightTex || ''"
  11. @click="handleToLink(item)"
  12. >
  13. </uni-list-item>
  14. </uni-list>
  15. </view>
  16. </template>
  17. <script setup>
  18. import { ref } from 'vue'
  19. const defaultList = [
  20. { title: '学生信息', path: '/pagesA/student/information' },
  21. { title: '实习企业', path: '/pagesA/student/internshipCompany', rightTex: '未开放' },
  22. { title: '实习报告', path: '/pagesA/student/internshipReport', rightTex: '未开放' },
  23. { title: '实习证书', path: '/pagesA/student/internshipCertificate' },
  24. { title: '企业推荐信', path: '/pagesA/student/enterpriseRecommendationLetter' },
  25. { title: '实习管家', path: '/pagesA/student/internshipButler' },
  26. ]
  27. const list = ref(defaultList.filter(e => !e.hide))
  28. const handleToLink = (item) => {
  29. if (item.rightTex === '未开放') return
  30. if (item.path) return uni.navigateTo({ url: item.path })
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. :deep(.uni-list-item) {
  35. height: 120rpx !important;
  36. line-height: 120rpx !important;
  37. }
  38. :deep(.uni-list-item__content-title) {
  39. font-size: 32rpx !important;
  40. font-weight: 500;
  41. }
  42. </style>