Merge branch 'develop'

Former-commit-id: f3aa24b82ad931b87b132a540c19a2e30ce36dce
This commit is contained in:
liyang
2019-01-09 21:12:41 +08:00
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -56,11 +56,8 @@ router.beforeEach((to, from, next) => {
router.afterEach(to => { router.afterEach(to => {
// 进度条 // 进度条
NProgress.done() NProgress.done()
// 需要的信息
const app = router.app
const { name, params, query, fullPath } = to
// 多页控制 打开新的页面 // 多页控制 打开新的页面
app.$store.dispatch('d2admin/page/open', { name, params, query, fullPath }) store.dispatch('d2admin/page/open', to)
// 更改标题 // 更改标题
util.title(to.meta.title) util.title(to.meta.title)
}) })
+1 -1
View File
@@ -125,7 +125,7 @@ export default {
* @class current * @class current
* @description 打开一个新的页面 * @description 打开一个新的页面
* @param {Object} state vuex state * @param {Object} state vuex state
* @param {Object} param { name, params, query, fullPath } 路由信息 * @param {Object} param 从路由钩子的 to 对象上获取 { name, params, query, fullPath } 路由信息
*/ */
open ({ state, commit, dispatch }, { name, params, query, fullPath }) { open ({ state, commit, dispatch }, { name, params, query, fullPath }) {
return new Promise(async resolve => { return new Promise(async resolve => {