mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 00:15:54 +08:00
commit message
This commit is contained in:
35
components/ms-dropdown/dropdown-menu.vue
Normal file
35
components/ms-dropdown/dropdown-menu.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user