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']">
|
||||
<span :class="confirmColorClasses">
|
||||
<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 v-else>{{formatColor}}</template>
|
||||
</span>
|
||||
|
@ -424,7 +424,9 @@ export default {
|
|||
handleClose(event) {
|
||||
if (this.visible) {
|
||||
if (this.dragging || event.type === 'mousedown') {
|
||||
if (this.$refs.editColorInput && event.target !== this.$refs.editColorInput.$el.querySelector('input')) {
|
||||
event.preventDefault();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue