index.vue 894 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="content">
  3. <home v-if="tabbarActive === 'home'" @switch-tab="tabbarActive = 'exhibitor'"/>
  4. <exhibitor v-if="tabbarActive === 'exhibitor'" />
  5. <activity v-if="tabbarActive === 'activity'" />
  6. <user v-if="tabbarActive === 'user'" />
  7. <tab-bar :active.sync="tabbarActive"></tab-bar>
  8. </view>
  9. </template>
  10. <script>
  11. import TabBar from '@/components/layout/tab-bar.vue'
  12. import Home from '@/pages/index/home.vue'
  13. import Exhibitor from '@/pages/exhibitor/index.vue'
  14. import Activity from '@/pages/activity/index.vue'
  15. import User from '@/pages/user/index.vue'
  16. export default {
  17. options: {
  18. styleIsolation: 'shared'
  19. },
  20. components: {
  21. TabBar,
  22. Home,
  23. Exhibitor,
  24. Activity,
  25. User
  26. },
  27. data() {
  28. return {
  29. tabbarActive: 'home'
  30. }
  31. },
  32. created() {},
  33. methods: {
  34. onClickSearch() {
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. </style>