index.vue 872 B

12345678910111213141516171819202122232425262728293031323334
  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 } from 'vue';
  25. const showPage = ref('home');
  26. function change1(value) {
  27. showPage.value = value;
  28. }
  29. </script>
  30. <style></style>