axios封装
axios封装 Former-commit-id: 4dc0646a8509fe9cb6c5218e9dfc864b0af59143 [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f] [formerly 4dc0646a8509fe9cb6c5218e9dfc864b0af59143 [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f] [formerly 4dc0646a8509fe9cb6c5218e9dfc864b0af59143 [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f] [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f [formerly 0dad01580037e9ada6f7f9201eab7e28bafbadd4 [formerly 97a660059b807afdf8c0c518d4f40be4ce7eceec]]]]] Former-commit-id: 95e753d1626ce41c1465bac635687ce5989877a5 Former-commit-id: 2e567e9e2bb7d07e9cf52dbfe29b140c24c76b48 Former-commit-id: 37e5cef6e554af37fc7d55785552160ff086c03d [formerly 14edcd31bc67642337f8eddf2ec7cbdec23ecc2c] Former-commit-id: 08a71cba6653878d9accae5a7ecfcf1122d3515a Former-commit-id: a1731726720512ae8a5a7fd5973f4c90a62ac448 Former-commit-id: 3838dfd576136f0ac217d9a97d631f9a88191d31 Former-commit-id: fa2416a4c270dce89a33e0486569374c5c7b6a63 Former-commit-id: b03e226c26ea5495e1d7d6a2206b89c8f4e17815
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-menu mode="horizontal" @select="handleMenuSelect">
|
||||
<el-menu mode="horizontal" :default-active="active" @select="handleMenuSelect">
|
||||
<template v-for="(menu, menuIndex) in header">
|
||||
<d2-layout-header-aside-menu-item v-if="menu.children === undefined" :menu="menu" :key="menuIndex"/>
|
||||
<d2-layout-header-aside-menu-sub v-else :menu="menu" :key="menuIndex"/>
|
||||
@@ -25,6 +25,19 @@ export default {
|
||||
...mapState('d2admin/menu', [
|
||||
'header'
|
||||
])
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
active: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route.matched': {
|
||||
handler (val) {
|
||||
this.active = val[val.length - 1].path
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user