components/dropdown-menu.vue
@@ -40,6 +40,10 @@ export default { name: 'DropdownMenu', props: { // 业务数据,选中菜单后一同返回 data: { type: Object }, // 选项列表 options: { type: Array, @@ -103,7 +107,7 @@ // 根据配置返回整个对象或value值 const emitValue = typeof item === 'object' ? item[this.valueKey] : item this.$emit('input', emitValue) this.$emit('change', emitValue) this.$emit('change', emitValue, this.data) } } } @@ -149,7 +153,7 @@ .dropdown-menu { position: absolute; left: 0; left: -50rpx; display: inline-block; white-space: nowrap; background-color: #fff;