From 533890a3763b63e2a3f685d5be313d511fee0d29 Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Thu, 22 Oct 2020 11:42:27 +0800 Subject: [PATCH] update docs --- docs/advance/async.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/advance/async.md b/docs/advance/async.md index 750f6d7..ee1d9a1 100644 --- a/docs/advance/async.md +++ b/docs/advance/async.md @@ -197,7 +197,7 @@ export default options ```js {3} getRoutesConfig().then(result => { const routesConfig = result.data.data - loadRoutes({router: this.$router, store: this.$store, i18n: this.$i18n}, routesConfig) + loadRoutes(routesConfig) }) ``` 至此,异步路由的加载就完成了,你可以访问异步加载的路由了。 @@ -209,12 +209,9 @@ loadRoutes 方法会合并 /router/async/config.async.js 文件中配置的基 ```js /** * 加载路由 - * @param router 应用路由实例 - * @param store 应用的 vuex.store 实例 - * @param i18n 应用的 vue-i18n 实例 * @param routesConfig 路由配置 */ -function loadRoutes({router, store, i18n}, routesConfig) { +function loadRoutes(routesConfig) { // 如果 routesConfig 有值,则更新到本地,否则从本地获取 if (routesConfig) { store.commit('account/setRoutesConfig', routesConfig)