index.vue 934 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. <van-dialog id="van-dialog" />
  8. <tab-bar :active.sync="tabbarActive"></tab-bar>
  9. </view>
  10. </template>
  11. <script>
  12. import TabBar from '@/components/layout/tab-bar.vue'
  13. import Home from '@/pages/index/home.vue'
  14. import Exhibitor from '@/pages/exhibitor/index.vue'
  15. import Activity from '@/pages/activity/index.vue'
  16. import User from '@/pages/user/index.vue'
  17. export default {
  18. options: {
  19. styleIsolation: 'shared'
  20. },
  21. components: {
  22. TabBar,
  23. Home,
  24. Exhibitor,
  25. Activity,
  26. User
  27. },
  28. data() {
  29. return {
  30. tabbarActive: 'home'
  31. }
  32. },
  33. created() {
  34. },
  35. methods: {
  36. onClickSearch() {
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. </style>