if-admin-layout
Advanced tools
+1
-1
| { | ||
| "name": "if-admin-layout", | ||
| "version": "1.0.10", | ||
| "version": "1.0.11", | ||
| "description": "基于Element-plus的侧边栏组件", | ||
@@ -5,0 +5,0 @@ "main": "./src/layout/index.js", |
| import { IfLayout as Layout, IfKeepAlive, IfMicroApp } from './components' | ||
| import IfLayoutConfigStore from './store' | ||
| import { inject } from 'vue' | ||
| import { StoreName } from './hooks'; | ||
| import { StoreName, getRoutes } from './hooks'; | ||
| import createPersistedState from 'vuex-persistedstate' | ||
@@ -84,4 +84,8 @@ | ||
| const { store } = this.config; | ||
| if(routes) { | ||
| store.commit(StoreName + '/setRoutes', routes) | ||
| } else { | ||
| routes = getRoutes()['routes'] | ||
| } | ||
| this.updateMicroComponent(routes); | ||
| routes && store.commit(StoreName + '/setRoutes', routes) | ||
| return this.createRouter(routes, router); | ||
@@ -88,0 +92,0 @@ } |
34276
0.28%657
0.61%