This commit is contained in:
梁灏 2021-01-11 12:17:25 +08:00
parent 997339aeaf
commit b76a3c5d7a

View file

@ -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;
} }