shop-wx/src/App.ku.vue

43 lines
1.1 KiB
Vue
Raw Normal View History

<script setup lang="ts">
import { ref } from 'vue'
import { useThemeStore } from '@/store'
import Tabbar from '@/tabbar/index.vue'
import { isPageTabbar } from './tabbar/store'
import { currRoute } from './utils'
import { useUserStore } from '@/store/user';
const themeStore = useThemeStore()
/** 登录用户信息 */
const userStore = useUserStore();
const isCurrentPageTabbar = ref(true)
onShow(() => {
const { path } = currRoute()
isCurrentPageTabbar.value = isPageTabbar(path)
})
const helloKuRoot = ref('Hello AppKuVue')
const exposeRef = ref('this is form app.Ku.vue')
defineExpose({
exposeRef,
})
const showPosition = computed(() => userStore.showPosition);
</script>
<template>
<wd-config-provider :theme-vars="themeStore.themeVars" :theme="themeStore.theme">
<!-- 这个先隐藏了知道这样用就行 -->
<view class="hidden text-center">
{{ helloKuRoot }}这里可以配置全局的东西
</view>
<KuRootView />
<Tabbar v-if="isCurrentPageTabbar" />
<wd-toast />
<wd-message-box />
<position-edit z-index="1000" ref="positionEditRef" v-model="showPosition" />
</wd-config-provider>
</template>