forked from platypush/platypush
[UI] Dropdown's hidden class should be set as a property.
This commit is contained in:
parent
9b99c1e19d
commit
117dfad64e
2 changed files with 2 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
||||||
<span class="text" v-text="text" v-if="text" />
|
<span class="text" v-text="text" v-if="text" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="body-container hidden" ref="dropdownContainer">
|
<div class="body-container" :class="{ hidden: !visible }" ref="dropdownContainer">
|
||||||
<DropdownBody :id="id"
|
<DropdownBody :id="id"
|
||||||
:keepOpenOnItemClick="keepOpenOnItemClick"
|
:keepOpenOnItemClick="keepOpenOnItemClick"
|
||||||
:style="style"
|
:style="style"
|
||||||
|
@ -143,7 +143,6 @@ export default {
|
||||||
this.$el.appendChild(element)
|
this.$el.appendChild(element)
|
||||||
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$refs.dropdownContainer.classList.remove('hidden')
|
|
||||||
this.$nextTick(this.adjustDropdownPos)
|
this.$nextTick(this.adjustDropdownPos)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -179,7 +178,6 @@ export default {
|
||||||
element.style.top = `${pos.top}px`
|
element.style.top = `${pos.top}px`
|
||||||
element.style.left = `${pos.left}px`
|
element.style.left = `${pos.left}px`
|
||||||
bus.emit('dropdown-open', this.$refs.dropdown)
|
bus.emit('dropdown-open', this.$refs.dropdown)
|
||||||
this.$refs.dropdownContainer.classList.add('hidden')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle(event) {
|
toggle(event) {
|
||||||
|
|
|
@ -14,6 +14,7 @@ export default {
|
||||||
if (!component.keepOpenOnItemClick)
|
if (!component.keepOpenOnItemClick)
|
||||||
this.onClose()
|
this.onClose()
|
||||||
|
|
||||||
|
component.$el.classList.remove('hidden')
|
||||||
this.$el.appendChild(component.$el)
|
this.$el.appendChild(component.$el)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue