学员端小程序
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.

74 lines
1.4 KiB

1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="找考场"></topNavbar>
  4. <view class="pad">
  5. <view class="search">
  6. <searchRow placeholder="搜索考场名称"/>
  7. </view>
  8. <view class="navBox">
  9. <view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
  10. </view>
  11. <view class="card">
  12. <examineItem></examineItem>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import examineItem from '../comp/examineItem.vue'
  19. export default {
  20. components: {
  21. examineItem
  22. },
  23. data() {
  24. return {
  25. navList: [
  26. {text: '全部', id: 0},
  27. {text: '理论', id: 1},
  28. {text: '科目二', id: 2},
  29. {text: '科目三', id: 3},
  30. ],
  31. currentNav: 0
  32. }
  33. },
  34. methods: {
  35. changeNav(item) {
  36. this.currentNav = item.id
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .pageBgImg {
  43. min-height: 100vh;
  44. }
  45. .navBox {
  46. display: flex;
  47. justify-content: space-between;
  48. padding: 24rpx 42rpx 36rpx 42rpx;
  49. .nav {
  50. display: flex;
  51. font-size: 28rpx;
  52. color: #fff;
  53. &.active {
  54. position: relative;
  55. &::before {
  56. content: '';
  57. position: absolute;
  58. bottom: -14rpx;
  59. left: 50%;
  60. transform: translateX(-50%);
  61. width: 50rpx;
  62. height: 4rpx;
  63. background-color: #fff;
  64. border-radius: 0 0 2rpx 2rpx;
  65. }
  66. }
  67. }
  68. }
  69. .card {
  70. padding: 32rpx 24rpx 28rpx 24rpx;
  71. margin-bottom: 20rpx;
  72. }
  73. </style>