remove useless index param of onSwitch
This commit is contained in:
parent
539913673f
commit
cd14566a34
|
@ -13,7 +13,7 @@ const Interactions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onModeSwitch (index, dataset) {
|
onModeSwitch (dataset) {
|
||||||
this.filterMode = tabModeDict[dataset.filter]
|
this.filterMode = tabModeDict[dataset.filter]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -75,7 +75,7 @@ const Search = {
|
||||||
const length = this[tabName].length
|
const length = this[tabName].length
|
||||||
return length === 0 ? '' : ` (${length})`
|
return length === 0 ? '' : ` (${length})`
|
||||||
},
|
},
|
||||||
onResultTabSwitch (_index, dataset) {
|
onResultTabSwitch (dataset) {
|
||||||
this.currenResultTab = dataset.filter
|
this.currenResultTab = dataset.filter
|
||||||
},
|
},
|
||||||
getActiveTab () {
|
getActiveTab () {
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default Vue.component('tab-switcher', {
|
||||||
activateTab (index, dataset) {
|
activateTab (index, dataset) {
|
||||||
return () => {
|
return () => {
|
||||||
if (typeof this.onSwitch === 'function') {
|
if (typeof this.onSwitch === 'function') {
|
||||||
this.onSwitch.call(null, index, this.$slots.default[index].elm.dataset)
|
this.onSwitch.call(null, this.$slots.default[index].elm.dataset)
|
||||||
}
|
}
|
||||||
this.active = index
|
this.active = index
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue