平安校园
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.
 
 
 
 
 
 

54 lines
1.1 KiB

  1. <template>
  2. <view style="height: 100%;">
  3. <u-tabs :list="tabsList" @click="tabsClick" :activeStyle="{
  4. color: '#000000',
  5. }" itemStyle="height:84rpx;width:33.33%;box-sizing:border-box;background:#fff;border-top:1rpx solid rgba(0,0,0,0.03)"></u-tabs>
  6. <view style="height: calc(100% - 84rpx);">
  7. <component :is="componentName" ref="pageComponent"/>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import passengerFlow from "./passengerFlow/index.vue"
  13. import returnBed from "./returnBed/index.vue"
  14. import rollCall from "./rollCall/index.vue"
  15. export default {
  16. components:{
  17. passengerFlow,returnBed,rollCall
  18. },
  19. data() {
  20. return {
  21. tabsList: [{
  22. name: "点名",
  23. value: 'rollCall'
  24. },
  25. {
  26. name: "归寝",
  27. value: 'returnBed'
  28. },
  29. {
  30. name: "客流",
  31. value: 'passengerFlow'
  32. },
  33. ],
  34. componentName:'rollCall'
  35. }
  36. },
  37. methods: {
  38. tabsClick(item) {
  39. this.componentName = item.value
  40. }
  41. },
  42. onPullDownRefresh(){
  43. this.$refs['pageComponent'].pullDownRefresh()
  44. uni.stopPullDownRefresh()
  45. }
  46. }
  47. </script>
  48. <style>
  49. </style>