App.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <Container title="学习本">
  3. <view class="header">
  4. <view class="stats">
  5. <text>10000/20000</text>
  6. <text>正确率50%</text>
  7. </view>
  8. <view class="tabs">
  9. <view class="tab active">法规</view>
  10. <view class="tab">药一</view>
  11. <view class="tab">药综</view>
  12. <view class="tab">中药一</view>
  13. <view class="tab">中药二</view>
  14. <view class="tab">中药二</view>
  15. </view>
  16. <view class="sub-tabs">
  17. <view class="sub-tab active">答案正确(2301)</view>
  18. <view class="sub-tab">答案错误(2301)</view>
  19. </view>
  20. </view>
  21. <view class="content">
  22. <view class="question-card" v-for="(question, index) in questions" :key="index">
  23. <view class="question-header">
  24. <text class="question-type">单选题</text>
  25. <text class="question-date">2025-03-20 20:30:20</text>
  26. </view>
  27. <view class="question-text">
  28. 根据中药七情配伍理论,属于相畏的药组是?
  29. </view>
  30. <view class="options">
  31. <view class="option" v-for="(option, i) in ['A', 'B', 'C', 'D', 'E']" :key="i">
  32. <text>{{ option }}</text>
  33. <text>选项内容</text>
  34. </view>
  35. </view>
  36. <view class="footer">
  37. <button class="button">查看解析与考点</button>
  38. </view>
  39. </view>
  40. </view>
  41. </Container>
  42. </template>
  43. <script setup>
  44. import Container from "@/components/Container/Container.vue";
  45. console.log(11);
  46. // 示例数据
  47. const questions = Array(2).fill({});
  48. </script>
  49. <style scoped lang="scss">
  50. @import '@/uni.scss';
  51. .header {
  52. padding: 16rpx;
  53. background-color: #fff;
  54. .stats {
  55. display: flex;
  56. justify-content: space-between;
  57. margin-bottom: 8rpx;
  58. }
  59. .tabs, .sub-tabs {
  60. display: flex;
  61. margin-bottom: 8rpx;
  62. .tab, .sub-tab {
  63. padding: 8rpx 16rpx;
  64. border-radius: 8rpx;
  65. &.active {
  66. background-color: $uni-primary;
  67. color: #fff;
  68. }
  69. }
  70. }
  71. }
  72. .content {
  73. padding: 16rpx;
  74. .question-card {
  75. background-color: #fff;
  76. border-radius: 8rpx;
  77. margin-bottom: 16rpx;
  78. padding: 16rpx;
  79. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  80. .question-header {
  81. display: flex;
  82. justify-content: space-between;
  83. margin-bottom: 8rpx;
  84. .question-type {
  85. color: $uni-primary;
  86. }
  87. }
  88. .options {
  89. margin-top: 8rpx;
  90. .option {
  91. display: flex;
  92. align-items: center;
  93. margin-bottom: 4rpx;
  94. text {
  95. margin-right: 8rpx;
  96. }
  97. }
  98. }
  99. .footer {
  100. margin-top: 8rpx;
  101. .button {
  102. background-color: $uni-primary;
  103. color: #fff;
  104. padding: 8rpx 16rpx;
  105. border-radius: 8rpx;
  106. text-align: center;
  107. }
  108. }
  109. }
  110. }
  111. </style>