volunteer-secondary/src/App.ku.vue

44 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<script setup lang="ts">
import { ref } from 'vue'
import FgTabbar from '@/tabbar/index.vue'
import { isPageTabbar } from './tabbar/store'
import { currRoute } from './utils'
const isCurrentPageTabbar = ref(true)
onShow(() => {
const { path } = currRoute()
// “蜡笔小开心”提到本地是 '/pages/index/index',线上是 '/' 导致线上 tabbar 不见了
// 所以这里需要判断一下,如果是 '/' 就当做首页,也要显示 tabbar
if (path === '/') {
isCurrentPageTabbar.value = true
}
else {
isCurrentPageTabbar.value = isPageTabbar(path)
}
})
onLoad(() => {
uni.loadFontFace({family:"DinBold",source:"https://lwzk.ycymedu.com/img/din-bold.ttf"})
uni.loadFontFace({family:'JinBuFont',source:"https://lwzk.ycymedu.com/img/DingTalkJinBuTi.ttf"})
})
const exposeRef = ref('this is form app.Ku.vue')
defineExpose({
exposeRef,
})
</script>
<template>
<!-- 这个先隐藏了知道这样用就行 -->
<view class="h-screen flex flex-col">
<KuRootView />
<FgTabbar v-if="isCurrentPageTabbar" />
</view>
</template>