You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
455 B
36 lines
455 B
4 years ago
|
<template>
|
||
|
<div class="dropdown-menu">
|
||
|
<slot></slot>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
}
|
||
|
},
|
||
|
mounted() {
|
||
|
this.$on('close', this.closeDropdown)
|
||
|
},
|
||
|
methods: {
|
||
|
closeDropdown() {
|
||
|
this.$children.forEach(item =>{
|
||
|
item.close();
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
.dropdown-menu {
|
||
|
display: flex;
|
||
|
overflow: auto;
|
||
|
white-space: nowrap;
|
||
|
}
|
||
|
dropdown-item {
|
||
|
flex: 1;
|
||
|
}
|
||
|
</style>
|