Skip to content

Commit f4205d7

Browse files
committed
chore: add reset btn
1 parent 7fa5ad9 commit f4205d7

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ pnpm start
111111
pnpm build
112112
```
113113

114+
---
115+
### 常见问题
116+
117+
- 修改路由后无法正常工作
118+
- 清空 localStorage 重置路由配置
119+
114120
---
115121

116122
### [仓库地址 issue ☹ star ★](https://github.com/wanpan11/react-admin-tp)

src/components/Error/index.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
import error from "&src/assets/images/error.png";
2+
import { RedoOutlined } from "@ant-design/icons";
3+
import { Button } from "antd";
24

35
import { memo } from "react";
46

57
function Error() {
68
return (
79
<div className=" flex h-screen w-screen flex-col items-center justify-center">
810
<img src={error} alt="" className="h-1/2" />
9-
<div>系统错误!!</div>
11+
12+
<div className="flex items-center">
13+
<div>系统错误!</div>
14+
15+
<Button
16+
type="link"
17+
className="my-2"
18+
icon={<RedoOutlined />}
19+
onClick={() => {
20+
localStorage.clear();
21+
window.location.reload();
22+
}}
23+
>
24+
重置路由
25+
</Button>
26+
</div>
1027
</div>
1128
);
1229
}

0 commit comments

Comments
 (0)