列表
This commit is contained in:
15
src/app.ts
15
src/app.ts
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user