Dropdown, Select, AutoComplete, DatePicker, TimePicker, Cascader, ColorPicker, Tooltip, Poptip add prop eventsEnabled

This commit is contained in:
梁灏 2021-05-27 15:06:03 +08:00
parent 8dc80b8430
commit b707ab7319
7 changed files with 42 additions and 1 deletions

View file

@ -18,6 +18,7 @@
@on-clickoutside="handleClickOutside" @on-clickoutside="handleClickOutside"
:transfer="transfer" :transfer="transfer"
:capture="capture" :capture="capture"
:eventsEnabled="eventsEnabled"
> >
<slot name="input"> <slot name="input">
<i-input <i-input
@ -117,6 +118,11 @@
default () { default () {
return !this.$IVIEW ? true : this.$IVIEW.capture; return !this.$IVIEW ? true : this.$IVIEW.capture;
} }
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data () { data () {

View file

@ -25,6 +25,7 @@
v-show="visible" v-show="visible"
:class="dropdownCls" :class="dropdownCls"
ref="drop" ref="drop"
:eventsEnabled="eventsEnabled"
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom> v-transfer-dom>
@ -152,6 +153,11 @@
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data () { data () {

View file

@ -41,6 +41,7 @@
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
:class="dropClasses" :class="dropClasses"
:eventsEnabled="eventsEnabled"
> >
<transition name="fade"> <transition name="fade">
<div <div
@ -231,6 +232,11 @@ export default {
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },

View file

@ -38,6 +38,7 @@
:class="dropdownCls" :class="dropdownCls"
:placement="placement" :placement="placement"
ref="drop" ref="drop"
:eventsEnabled="eventsEnabled"
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom> v-transfer-dom>
@ -223,6 +224,11 @@
}, },
transferClassName: { transferClassName: {
type: String type: String
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data(){ data(){

View file

@ -13,6 +13,7 @@
ref="drop" ref="drop"
@mouseenter.native="handleMouseenter" @mouseenter.native="handleMouseenter"
@mouseleave.native="handleMouseleave" @mouseleave.native="handleMouseleave"
:eventsEnabled="eventsEnabled"
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom><slot name="list"></slot></Drop> v-transfer-dom><slot name="list"></slot></Drop>
@ -67,6 +68,11 @@
default () { default () {
return !this.$IVIEW ? true : this.$IVIEW.capture; return !this.$IVIEW ? true : this.$IVIEW.capture;
} }
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
computed: { computed: {

View file

@ -21,6 +21,11 @@
}, },
transfer: { transfer: {
type: Boolean type: Boolean
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
data () { data () {
@ -50,7 +55,7 @@
this.popperStatus = true; this.popperStatus = true;
} else { } else {
this.popper = new Popper(this.$parent.$refs.reference, this.$el, { this.popper = new Popper(this.$parent.$refs.reference, this.$el, {
eventsEnabled: false, eventsEnabled: this.eventsEnabled,
placement: this.placement, placement: this.placement,
modifiers: { modifiers: {
computeStyle:{ computeStyle:{

View file

@ -63,6 +63,7 @@
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :transfer="transfer"
v-transfer-dom v-transfer-dom
:eventsEnabled="eventsEnabled"
> >
<ul v-show="showNotFoundLabel && !allowCreate" :class="[prefixCls + '-not-found']"><li>{{ localeNotFoundText }}</li></ul> <ul v-show="showNotFoundLabel && !allowCreate" :class="[prefixCls + '-not-found']"><li>{{ localeNotFoundText }}</li></ul>
@ -290,6 +291,11 @@
filterByLabel: { filterByLabel: {
type: Boolean, type: Boolean,
default: false default: false
},
// 4.6.0
eventsEnabled: {
type: Boolean,
default: false
} }
}, },
mounted(){ mounted(){