mirror of
https://gitee.com/WeBank/fes.js.git
synced 2024-12-02 19:58:18 +08:00
docs: 更新文档
This commit is contained in:
parent
59fecc904f
commit
2703bed715
@ -39,26 +39,6 @@ export function beforeRender(lastOpts) {
|
||||
};
|
||||
```
|
||||
|
||||
### patchRoutes
|
||||
|
||||
patchRoutes({routes })
|
||||
|
||||
|
||||
修改路由。
|
||||
|
||||
比如在最前面添加一个 /foo 路由:
|
||||
```
|
||||
export function patchRoutes({ routes }) {
|
||||
routes.unshift({
|
||||
path: '/foo',
|
||||
component: require('@/extraRoutes/foo').default,
|
||||
});
|
||||
}
|
||||
```
|
||||
:::tip
|
||||
直接修改 `routes`, 不需要返回
|
||||
:::
|
||||
|
||||
### modifyClientRenderOpts
|
||||
|
||||
modifyClientRenderOpts(lastOpts)
|
||||
@ -103,6 +83,26 @@ export function rootContainer(container) {
|
||||
}
|
||||
```
|
||||
|
||||
### patchRoutes
|
||||
|
||||
patchRoutes({routes })
|
||||
|
||||
|
||||
修改路由。
|
||||
|
||||
比如在最前面添加一个 /foo 路由:
|
||||
```
|
||||
export function patchRoutes({ routes }) {
|
||||
routes.unshift({
|
||||
path: '/foo',
|
||||
component: require('@/extraRoutes/foo').default,
|
||||
});
|
||||
}
|
||||
```
|
||||
:::tip
|
||||
直接修改 `routes`, 不需要返回
|
||||
:::
|
||||
|
||||
### onAppCreated
|
||||
|
||||
onAppCreated({app})
|
||||
|
Loading…
Reference in New Issue
Block a user