mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
14 lines
452 B
JavaScript
14 lines
452 B
JavaScript
|
PetiteVue.createApp({
|
||
|
$delimiters: ['${', '}'],
|
||
|
state: {
|
||
|
showDropdownResources: false,
|
||
|
showDropdownUser: false,
|
||
|
showApiKey: false
|
||
|
},
|
||
|
mounted() {
|
||
|
window.addEventListener('click', (e) => {
|
||
|
const skip = findParentAttribute(e.target, 'data-trigger-for')?.value
|
||
|
Object.keys(this.state).filter(k => k !== skip).forEach(k => this.state[k] = false)
|
||
|
})
|
||
|
}
|
||
|
}).mount('#main-menu')
|