index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="work">
  3. <view class="status-bar">
  4. <!-- 这里是状态栏 -->
  5. </view>
  6. <div class="custom-navigation">
  7. <UserSpace></UserSpace>
  8. </div>
  9. <u-tabs :list="tabList" :is-scroll="false" :current="current" @change="tabChange"></u-tabs>
  10. <view style="height: calc(100% - 25px - 180rpx)">
  11. <Tab1 v-if="current == 0"></Tab1>
  12. <Tab2 v-else-if="current == 1"></Tab2>
  13. <Tab3 v-else-if="current == 2"></Tab3>
  14. </view>
  15. <Auth></Auth>
  16. </view>
  17. </template>
  18. <script>
  19. import Tab1 from './tab1-content.vue'
  20. import Tab2 from './tab2-content.vue'
  21. import Tab3 from './tab3-content.vue'
  22. import Auth from '@/components/auth.vue'
  23. import UserSpace from '@/components/user-space.vue'
  24. export default {
  25. name: 'IndexPage',
  26. components: { Tab1, Tab2, Tab3, Auth, UserSpace },
  27. data() {
  28. return {
  29. tabList: [{ name: '消息提醒' }, { name: 'SOP待办' }, { name: '通知公告' }],
  30. current: 0
  31. }
  32. },
  33. created() {},
  34. methods: {
  35. upper() {},
  36. lower() {},
  37. scroll() {},
  38. tabChange(index) {
  39. this.current = index
  40. }
  41. // doRouter(url) {
  42. // // 路由跳转
  43. // this.$Router.push({ path: url, query: { name: 'sop' } })
  44. // // 在onLoad中使用this.$Route.query获取参数
  45. // },
  46. // jumpToSwitchTab(url) {
  47. // this.$Router.pushTab({ path: url, query: { name: 'sop' } })
  48. // }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .work {
  54. height: 100vh;
  55. }
  56. </style>