fix ColorPicker bug, https://github.com/iview/iview/issues/6480
This commit is contained in:
parent
997339aeaf
commit
b76a3c5d7a
1 changed files with 4 additions and 2 deletions
|
@ -84,7 +84,7 @@
|
||||||
<div :class="[prefixCls + '-confirm']">
|
<div :class="[prefixCls + '-confirm']">
|
||||||
<span :class="confirmColorClasses">
|
<span :class="confirmColorClasses">
|
||||||
<template v-if="editable">
|
<template v-if="editable">
|
||||||
<i-input :value="formatColor" size="small" @on-enter="handleEditColor" @on-blur="handleEditColor"></i-input>
|
<i-input ref="editColorInput" :value="formatColor" size="small" @on-enter="handleEditColor" @on-blur="handleEditColor"></i-input>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>{{formatColor}}</template>
|
<template v-else>{{formatColor}}</template>
|
||||||
</span>
|
</span>
|
||||||
|
@ -424,7 +424,9 @@ export default {
|
||||||
handleClose(event) {
|
handleClose(event) {
|
||||||
if (this.visible) {
|
if (this.visible) {
|
||||||
if (this.dragging || event.type === 'mousedown') {
|
if (this.dragging || event.type === 'mousedown') {
|
||||||
event.preventDefault();
|
if (this.$refs.editColorInput && event.target !== this.$refs.editColorInput.$el.querySelector('input')) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue