调整字典及发布
This commit is contained in:
12
src/app.ts
12
src/app.ts
@@ -2,7 +2,6 @@ import { Component, ReactNode } from "react";
|
||||
import "./nutui-theme.scss";
|
||||
import "./app.scss";
|
||||
import "qweather-icons/font/qweather-icons.css";
|
||||
import { useDictionaryStore } from "./store/dictionaryStore";
|
||||
import { useGlobalStore } from "./store/global";
|
||||
|
||||
interface AppProps {
|
||||
@@ -17,7 +16,6 @@ class App extends Component<AppProps> {
|
||||
|
||||
componentDidMount() {
|
||||
// 初始化字典数据
|
||||
this.initDictionaryData();
|
||||
this.getNavBarHeight();
|
||||
// this.getLocation()
|
||||
}
|
||||
@@ -26,15 +24,7 @@ class App extends Component<AppProps> {
|
||||
|
||||
componentDidHide() {}
|
||||
|
||||
// 初始化字典数据
|
||||
private async initDictionaryData() {
|
||||
try {
|
||||
const { fetchDictionary } = useDictionaryStore.getState();
|
||||
await fetchDictionary();
|
||||
} catch (error) {
|
||||
console.error("初始化字典数据失败:", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取导航高度
|
||||
getNavBarHeight = () => {
|
||||
|
||||
Reference in New Issue
Block a user