2025-08-24 21:42:04 +08:00
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { ref } from 'vue'
|
2025-08-24 21:54:53 +08:00
|
|
|
|
import { useThemeStore } from '@/store'
|
2025-08-24 21:42:04 +08:00
|
|
|
|
import FgTabbar from '@/tabbar/index.vue'
|
|
|
|
|
|
import { isPageTabbar } from './tabbar/store'
|
|
|
|
|
|
import { currRoute } from './utils'
|
|
|
|
|
|
|
2025-08-24 21:54:53 +08:00
|
|
|
|
const themeStore = useThemeStore()
|
|
|
|
|
|
|
2025-08-24 21:42:04 +08:00
|
|
|
|
const isCurrentPageTabbar = ref(true)
|
|
|
|
|
|
onShow(() => {
|
|
|
|
|
|
console.log('App.ku.vue onShow', currRoute())
|
|
|
|
|
|
const { path } = currRoute()
|
|
|
|
|
|
isCurrentPageTabbar.value = isPageTabbar(path)
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const helloKuRoot = ref('Hello AppKuVue')
|
2025-08-24 21:48:29 +08:00
|
|
|
|
|
|
|
|
|
|
const exposeRef = ref('this is form app.Ku.vue')
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
|
|
exposeRef,
|
|
|
|
|
|
})
|
2025-08-24 21:42:04 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-08-25 11:21:54 +08:00
|
|
|
|
<!-- 这个先隐藏了,知道这样用就行 -->
|
|
|
|
|
|
<view class="hidden text-center">
|
2025-08-24 21:42:04 +08:00
|
|
|
|
{{ helloKuRoot }},这里可以配置全局的东西
|
|
|
|
|
|
</view>
|
2025-08-24 21:54:53 +08:00
|
|
|
|
<wd-config-provider :theme-vars="themeStore.themeVars" :theme="themeStore.theme">
|
|
|
|
|
|
<KuRootView />
|
|
|
|
|
|
</wd-config-provider>
|
|
|
|
|
|
|
2025-08-24 21:42:04 +08:00
|
|
|
|
<FgTabbar v-if="isCurrentPageTabbar" />
|
2025-08-24 21:54:53 +08:00
|
|
|
|
<wd-toast />
|
|
|
|
|
|
<wd-message-box />
|
2025-08-24 21:42:04 +08:00
|
|
|
|
</template>
|