vue 2 to 3 #1
@ -35,13 +35,11 @@ export default {
|
||||
updateActiveMenu(event) {
|
||||
const elem = event.target
|
||||
const value = elem.id
|
||||
this.$store.commit('setActiveMenu', value)
|
||||
if (value == this.activeMenu)
|
||||
this.$store.commit('setActiveMenu', "")
|
||||
else
|
||||
this.$store.commit('setActiveMenu', value)
|
||||
},
|
||||
isActive(event) {
|
||||
const elem = event.target
|
||||
if (elem.id === this.activeMenu) return true
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user