Multiple drop down sections for toggler

This commit is contained in:
George Drummond
2019-04-18 15:23:24 -04:00
parent d963130674
commit 847c300d33
5 changed files with 139 additions and 85 deletions

View File

@@ -1,14 +1,19 @@
import ToggleMixin from '../mixins/toggle'
export default {
name: 'toggler',
mixins: [ToggleMixin],
data: function() {
return {
selectedSection: null,
}
},
props: {
defaultVisible: {
type: Boolean,
default: () => false,
methods: {
toggleSection: function(sectionName) {
if (this.selectedSection === sectionName) {
this.selectedSection = null
} else {
this.selectedSection = sectionName
}
},
},
}