docs: 更新文档

This commit is contained in:
harrywan 2021-07-05 11:39:56 +08:00
parent 59fecc904f
commit 2703bed715

View File

@ -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})