docs: 更新w文档

This commit is contained in:
wanchun 2022-06-07 10:22:29 +08:00
parent 5ecab4524d
commit 329b41737d

View File

@ -70,6 +70,13 @@ plugin.applyPlugins({
Fes.js 路由基于 [Vue Router 4.0](https://next.router.vuejs.org/introduction.html),想了解更多的同学可以看看官方文档。
### getRouter
返回当前 `router` 实例。
```js
import { getRouter } from "@fesjs/fes";
const router = getRouter();
router.push();
```
### useRoute
返回当前 `route` 实例,相当于在模板内使用 `$route`。必须在 `setup` 函数内调用。