Skip to content

Commit

Permalink
优化一些细节
Browse files Browse the repository at this point in the history
  • Loading branch information
FairyEver committed Nov 14, 2018
1 parent 8827514 commit df6317b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/layout/header-aside/components/menu-side/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export default {
}, 500)
},
// 监听路由 控制侧边栏激活状态
'$route.matched': {
handler (val) {
this.active = val[val.length - 1].path
'$route': {
handler ({ fullPath }) {
this.active = fullPath
this.$nextTick(() => {
if (this.aside.length > 0 && this.$refs.menu) {
this.$refs.menu.activeIndex = this.active
this.$refs.menu.activeIndex = fullPath
}
})
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demo/playground/page-cache/params.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<d2-container type="card">
<template slot="header">这个页面会被 keep-alive</template>
<h1>编号:{{id}}</h1>
<h2 class="d2-mt-0">编号:{{id}}</h2>
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字保留,证明被缓存</p>
<el-input v-model="value" placeholder="input here"></el-input>
</d2-container>
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/d2admin/modules/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export default {
* @param {Object} param vm {Object} vue 实例
* @param {Object} param username {String} 用户账号
* @param {Object} param password {String} 密码
* @param {Object} param route {Object} 登录成功后定向的路由对象
* @param {Object} param route {Object} 登录成功后定向的路由对象 任何 vue-router 支持的格式
*/
login ({ dispatch }, {
vm,
username,
password,
route = {
name: 'index'
path: '/'
}
}) {
// 开始请求登录接口
Expand Down

0 comments on commit df6317b

Please sign in to comment.