mirror of https://github.com/ElemeFE/element
fix: popper trigger is click use v-model bugs
parent
473ef53f93
commit
535e7ca4a8
|
@ -77,6 +77,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
value: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
this.$nextTick(()=> off(this.referenceElement, 'click', this.doToggle));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
showPopper(val) {
|
showPopper(val) {
|
||||||
if (this.disabled) {
|
if (this.disabled) {
|
||||||
return;
|
return;
|
||||||
|
@ -92,6 +100,8 @@ export default {
|
||||||
if (!reference && this.$refs.wrapper.children) {
|
if (!reference && this.$refs.wrapper.children) {
|
||||||
reference = this.referenceElm = this.$refs.wrapper.children[0];
|
reference = this.referenceElm = this.$refs.wrapper.children[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.referenceElement = reference;
|
||||||
// 可访问性
|
// 可访问性
|
||||||
if (reference) {
|
if (reference) {
|
||||||
addClass(reference, 'el-popover__reference');
|
addClass(reference, 'el-popover__reference');
|
||||||
|
|
|
@ -56,7 +56,8 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showPopper: false,
|
showPopper: false,
|
||||||
currentPlacement: ''
|
currentPlacement: '',
|
||||||
|
referenceElement: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue