關於vue-router中路由權限用到的router.mtcher說明

// 替換現有router的routes router.matcher = new VueRouter({ routes: newRoutes }).matcher outer.matcher是比較核心的一個屬性。對外提供兩個方法match(負責route匹配), addRoutes(動態添加路由)。 具體緣由:在作路徑切換transitionTo方法中,首先就會使用const route =
相關文章
相關標籤/搜索