自动滚到到顶部

This commit is contained in:
禺狨
2023-04-17 11:20:54 +08:00
parent ec32b7a6d1
commit df2ab806c6
4 changed files with 18 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import { ConfigProvider } from "antd";
import zhCN from "antd/locale/zh_CN";
import App from "./App";
import "./index.scss"; //全局样式
import AutoScorllTop from "./AutoTop";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<Provider store={store}>
@@ -16,7 +17,9 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
theme={{ token: { colorPrimary: "#ff4d4f" } }}
>
<BrowserRouter>
<App />
<AutoScorllTop>
<App />
</AutoScorllTop>
</BrowserRouter>
</ConfigProvider>
</Provider>