fix:处理 snmp无法切换的问题

This commit is contained in:
zhangyu
2021-04-22 16:35:15 +08:00
parent 0200c58895
commit d386168142
3 changed files with 10 additions and 4 deletions

View File

@@ -174,6 +174,9 @@ export default {
}
}, 20)
},
clickTab (showTabInfo, showTab) {
this.$emit('changeShowTab', showTab)
},
toTopBtnHandler (wrap) {
const vm = this
wrap.addEventListener('scroll', bus.debounce(function () {

View File

@@ -1,8 +1,8 @@
<template>
<div>
<mib-file :show-tab="showTab" v-if="showTab == 'file'" @toCredentialTab="changeTab(['mib','credentials'],'credentials')" @toBrowserTab="changeTab(['mib','browser'],'browser')"></mib-file>
<mib-browser :show-tab="showTab" v-if="showTab == 'browser'" @toFileTab="changeTab(['mib','file'],'file')" @toCredentialTab="changeTab(['mib','credentials'],'credentials')"></mib-browser>
<credentials :show-tab="showTab" v-if="showTab == 'credentials'" @toFileTab="changeTab(['mib','file'],'file')" @toBrowserTab="changeTab(['mib','browser'],'browser')"></credentials>
<mib-file :show-tab="showTab" v-if="showTab == 'file'" @changeShowTab="changeShowTab" @toCredentialTab="changeTab(['mib','credentials'],'credentials')" @toBrowserTab="changeTab(['mib','browser'],'browser')"></mib-file>
<mib-browser :show-tab="showTab" v-if="showTab == 'browser'" @changeShowTab="changeShowTab" @toFileTab="changeTab(['mib','file'],'file')" @toCredentialTab="changeTab(['mib','credentials'],'credentials')"></mib-browser>
<credentials :show-tab="showTab" v-if="showTab == 'credentials'" @changeShowTab="changeShowTab" @toFileTab="changeTab(['mib','file'],'file')" @toBrowserTab="changeTab(['mib','browser'],'browser')"></credentials>
</div>
</template>
@@ -43,6 +43,9 @@ export default {
t: +new Date()
}
})
},
changeShowTab (showTab) {
this.showTab = showTab
}
},
watch: {

View File

@@ -103,7 +103,7 @@ export default new Router({
component: resolve => require(['../components/page/config/snmp.vue'], resolve)
},
{
path: '/snmp/:tab',
path: '/snmp',
component: resolve => require(['../components/page/config/snmp.vue'], resolve)
},
{