grade.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="container">
  3. <!-- 背景图片区域 -->
  4. <img class="img_bg" src="../../static/images/center-bg.png" />
  5. <!-- input组件区域 -->
  6. <headerInput @changeInputValue="changeInputValue" />
  7. <!-- 学校年级班级区域 -->
  8. <view class="school">万载三中/七年级/3班</view>
  9. <!-- 学生列表区域 -->
  10. <listView :list="list" :appType="appType" />
  11. </view>
  12. </template>
  13. <script setup>
  14. import { ref } from 'vue'
  15. import { onLoad } from '@dcloudio/uni-app'
  16. import headerInput from '@/components/headerInput.vue'
  17. import listView from '@/components/listView.vue'
  18. // 学生列表数组
  19. const list = ref([
  20. {
  21. id: 1,
  22. name: '李商隐',
  23. number: 6262662
  24. },
  25. {
  26. id: 2,
  27. name: '张三',
  28. number: 6266662
  29. },
  30. {
  31. id: 3,
  32. name: '李四',
  33. number: 6862662
  34. },
  35. {
  36. id: 4,
  37. name: '王五',
  38. number: 8262662
  39. }
  40. ])
  41. const appType = ref('')
  42. onLoad((options) => {
  43. appType.value = options.type || ''
  44. })
  45. // 输入框组件自定义事件
  46. const changeInputValue = (data) => {
  47. console.log(data)
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .container {
  52. display: flex;
  53. flex-direction: column;
  54. padding: 0 20rpx;
  55. min-height: 100vh;
  56. background-color: #f1f6fe;
  57. // 背景图片区域样式
  58. .img_bg {
  59. position: absolute;
  60. top: -70rpx;
  61. right: 0;
  62. width: 589rpx;
  63. height: 320rpx;
  64. pointer-events: none;
  65. }
  66. // 学校名称区域样式
  67. .school {
  68. margin-top: 38rpx;
  69. color: #808080;
  70. font-size: 28rpx;
  71. }
  72. }
  73. </style>