|
|
@ -38,7 +38,7 @@ export default {
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
visible (val) {
|
|
|
|
visible (val) {
|
|
|
|
if (!val) {
|
|
|
|
if (!val) {
|
|
|
|
this.lastVisible = false
|
|
|
|
this.lastVisible = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -51,6 +51,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.lastVisible = props.visible
|
|
|
|
this.lastVisible = props.visible
|
|
|
|
this.lastInputValue = props.inputValue
|
|
|
|
this.lastInputValue = props.inputValue
|
|
|
|
|
|
|
|
this.prevVisible = this.visible
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
scrollActiveItemToView () {
|
|
|
|
scrollActiveItemToView () {
|
|
|
@ -89,7 +90,7 @@ export default {
|
|
|
|
firstActiveValue,
|
|
|
|
firstActiveValue,
|
|
|
|
dropdownMenuStyle,
|
|
|
|
dropdownMenuStyle,
|
|
|
|
} = props
|
|
|
|
} = props
|
|
|
|
const { menuDeselect, menuSelect } = this.$listeners
|
|
|
|
const { menuDeselect, menuSelect, popupScroll } = this.$listeners
|
|
|
|
if (menuItems && menuItems.length) {
|
|
|
|
if (menuItems && menuItems.length) {
|
|
|
|
const selectedKeys = getSelectKeys(menuItems, value)
|
|
|
|
const selectedKeys = getSelectKeys(menuItems, value)
|
|
|
|
const menuProps = {
|
|
|
|
const menuProps = {
|
|
|
@ -103,6 +104,9 @@ export default {
|
|
|
|
style: dropdownMenuStyle,
|
|
|
|
style: dropdownMenuStyle,
|
|
|
|
ref: 'menuRef',
|
|
|
|
ref: 'menuRef',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (popupScroll) {
|
|
|
|
|
|
|
|
menuProps.on.scroll = popupScroll
|
|
|
|
|
|
|
|
}
|
|
|
|
if (multiple) {
|
|
|
|
if (multiple) {
|
|
|
|
menuProps.on.deselect = menuDeselect
|
|
|
|
menuProps.on.deselect = menuDeselect
|
|
|
|
menuProps.on.select = menuSelect
|
|
|
|
menuProps.on.select = menuSelect
|
|
|
@ -160,7 +164,6 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
render () {
|
|
|
|
render () {
|
|
|
|
const renderMenu = this.renderMenu()
|
|
|
|
const renderMenu = this.renderMenu()
|
|
|
|
this.prevVisible = this.visible
|
|
|
|
|
|
|
|
const { popupFocus, popupScroll } = this.$listeners
|
|
|
|
const { popupFocus, popupScroll } = this.$listeners
|
|
|
|
return renderMenu ? (
|
|
|
|
return renderMenu ? (
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|