|
|
@ -4,19 +4,12 @@ import './tab_switcher.scss'
|
|
|
|
|
|
|
|
|
|
|
|
export default Vue.component('tab-switcher', {
|
|
|
|
export default Vue.component('tab-switcher', {
|
|
|
|
name: 'TabSwitcher',
|
|
|
|
name: 'TabSwitcher',
|
|
|
|
props: ['refresh', 'renderOnlyFocused'],
|
|
|
|
props: ['renderOnlyFocused'],
|
|
|
|
data () {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
active: this.$slots.default.findIndex(_ => _.tag)
|
|
|
|
active: this.$slots.default.findIndex(_ => _.tag)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
$route () {
|
|
|
|
|
|
|
|
if (this.refresh) {
|
|
|
|
|
|
|
|
this.active = 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
activateTab (index) {
|
|
|
|
activateTab (index) {
|
|
|
|
return () => {
|
|
|
|
return () => {
|
|
|
|