This commit is contained in:
juguohong
2025-08-30 18:20:50 +08:00
parent 1cb303b86d
commit d92419f3c5
23 changed files with 456 additions and 266 deletions

View File

@@ -2,6 +2,9 @@ import { Component, ReactNode } from 'react'
import './nutui-theme.scss'
import './app.scss'
import { useDictionaryStore } from './store/dictionaryStore'
import { useGlobalStore } from './store/global'
// import { getNavbarHeight } from "@/utils/getNavbarHeight";
interface AppProps {
children: ReactNode
@@ -11,11 +14,12 @@ class App extends Component<AppProps> {
componentDidMount() {
// 初始化字典数据
this.initDictionaryData()
this.getNavBarHeight()
}
componentDidShow() {}
componentDidShow() { }
componentDidHide() {}
componentDidHide() { }
// 初始化字典数据
private async initDictionaryData() {
@@ -27,6 +31,13 @@ class App extends Component<AppProps> {
}
}
// 获取导航高度
getNavBarHeight = () => {
const { getNavbarHeightInfo } = useGlobalStore.getState()
getNavbarHeightInfo()
}
render() {
// this.props.children 是将要会渲染的页面
return this.props.children