change side menu with url link

This commit is contained in:
virusdefender 2016-11-19 21:13:11 +08:00
parent de6c78025f
commit 9b47747949

View File

@ -1,5 +1,5 @@
<template>
<el-menu default-active="1" class="vertical_menu" theme="dark" :router="true">
<el-menu default-active="1" class="vertical_menu" theme="dark" :router="true" :unique-opened="true" :default-active="currentPath">
<div class="logo">
<img src="../assets/logo.svg" alt="oj admin" />
</div>
@ -14,6 +14,14 @@
<script>
export default{
data () {
return {
currentPath: ''
}
},
mounted () {
this.currentPath = this.$route.path.substring(1)
}
}
</script>