feat: 添加@uni-ku/root依赖并配置vite插件

移除页面中的tabbar布局配置
在default.vue中暴露testUniLayoutExposedData
添加App.ku.vue作为根组件
更新pages.json移除tabbar布局配置
This commit is contained in:
feige996
2025-08-24 21:42:04 +08:00
parent 21cbb7970b
commit a108236784
9 changed files with 57 additions and 6 deletions

24
src/App.ku.vue Normal file
View File

@@ -0,0 +1,24 @@
<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(() => {
console.log('App.ku.vue onShow', currRoute())
const { path } = currRoute()
isCurrentPageTabbar.value = isPageTabbar(path)
})
const helloKuRoot = ref('Hello AppKuVue')
</script>
<template>
<view class="text-center">
{{ helloKuRoot }}这里可以配置全局的东西
</view>
<!-- 顶级 KuRootView -->
<KuRootView />
<FgTabbar v-if="isCurrentPageTabbar" />
</template>