123456789101112131415161718192021222324252627282930313233343536373839 |
- <template>
- <home v-show="showPage != 'my'" />
- <my v-show="showPage != 'home'" />
- <up-tabbar :fixed="true" :value="showPage" @change="change1">
- <up-tabbar-item text="首页" name="home">
- <template #active-icon>
- <view class="iconfont icon-zhuye-weixuanzhong" style="color: #1965E7;" />
- </template>
- <template #inactive-icon>
- <view class="iconfont icon-zhuye-weixuanzhong" />
- </template>
- </up-tabbar-item>
- <up-tabbar-item text="我的" name="my">
- <template #active-icon>
- <view class="iconfont icon-wode-weixuanzhong" style="color: #1965E7;" />
- </template>
- <template #inactive-icon>
- <view class="iconfont icon-wode-weixuanzhong" />
- </template>
- </up-tabbar-item>
- </up-tabbar>
- </template>
- <script setup>
- import home from './home.vue';
- import my from './my.vue';
- import { ref, getCurrentInstance } from 'vue'
- const { $Http } = getCurrentInstance().proxy;
- const showPage = ref('home');
- function change1(value) {
- if (value == 'home') $Http.uploadNumber && $Http.uploadNumber();
- showPage.value = value;
- }
- </script>
- <style></style>
|