是由于点击内部下拉框选项导致外部select组件clickOutside监听事件触发导致的。解决办法:内部select组件下拉框打开时暂时移除外部mouseUp监听函数,外部select组件添加 ref="xxx"属性,内部select添加 @visible-Change=""visibleChange"事件函数
visibleChange(value) {
if (value) {
this.documentHandler = this.$refs.xxx.$el['@@clickoutsideContext'].documentHandler
this.$refs.xxx.$el['@@clickoutsideContext'].documentHandler = (mouseup = {}, mousedown = {}) => {}
} else {
this.$refs.xxx.$el['@@clickoutsideContext'].documentHandler = this.documentHandler
}
},