forked from umijs/umi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
id: add-404-page | ||
title: 添加 404 页面 | ||
--- | ||
|
||
umi 中约定 pages 目录下的 404.js 为 404 页面,这个文件需要返回 React 组件。比如: | ||
|
||
```js | ||
export default () => { | ||
return ( | ||
<div>404 page</div> | ||
); | ||
}; | ||
``` | ||
|
||
开发模式下,umi 会添加一个默认的 404 页面,但你仍然可通过精确地访问 `/404` 来验证 404 页面。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
], | ||
"Guides": [ | ||
"router", | ||
"add-404-page", | ||
"html-tpl", | ||
"load-on-demand", | ||
"pwa", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
id: add-404-page | ||
title: 添加 404 页面 | ||
--- | ||
|
||
umi 中约定 pages 目录下的 404.js 为 404 页面,这个文件需要返回 React 组件。比如: | ||
|
||
```js | ||
export default () => { | ||
return ( | ||
<div>404 page</div> | ||
); | ||
}; | ||
``` | ||
|
||
开发模式下,umi 会添加一个默认的 404 页面,但你仍然可通过精确地访问 `/404` 来验证 404 页面。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters