index.vue 1003 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <home v-show="showPage != 'my'" />
  3. <up-tabbar :fixed="true" :value="showPage" @change="change1">
  4. <up-tabbar-item text="首页" name="home">
  5. <template #active-icon>
  6. <view class="iconfont icon-zhuye-xuanzhong" style="color: #1965E7;" />
  7. </template>
  8. <template #inactive-icon>
  9. <view class="iconfont icon-zhuye-xuanzhong" />
  10. </template>
  11. </up-tabbar-item>
  12. <up-tabbar-item text="我的" name="my">
  13. <template #active-icon>
  14. <view class="iconfont icon-wode-xuanzhong" style="color: #1965E7;" />
  15. </template>
  16. <template #inactive-icon>
  17. <view class="iconfont icon-wode-xuanzhong" />
  18. </template>
  19. </up-tabbar-item>
  20. </up-tabbar>
  21. </template>
  22. <script setup>
  23. import home from './home.vue';
  24. import { ref, getCurrentInstance } from 'vue'
  25. const { $Http } = getCurrentInstance().proxy;
  26. const showPage = ref('home');
  27. function change1(value) {
  28. if (value == 'home') $Http.uploadNumber && $Http.uploadNumber();
  29. showPage.value = value;
  30. }
  31. </script>
  32. <style></style>