grade.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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" />
  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. onLoad(() => {})
  42. // 输入框组件自定义事件
  43. const changeInputValue = (data) => {
  44. console.log(data)
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .container {
  49. display: flex;
  50. flex-direction: column;
  51. padding: 0 20rpx;
  52. min-height: 100vh;
  53. background-color: #f1f6fe;
  54. // 背景图片区域样式
  55. .img_bg {
  56. position: absolute;
  57. top: -70rpx;
  58. right: -32rpx;
  59. width: 589rpx;
  60. height: 320rpx;
  61. pointer-events: none;
  62. }
  63. // 学校名称区域样式
  64. .school {
  65. margin-top: 38rpx;
  66. color: #808080;
  67. font-size: 28rpx;
  68. }
  69. }
  70. </style>