fix(components): prevent blur event when is disabled (#19320)

fix: prevent blur event when is disabled
This commit is contained in:
DDDDD12138 2024-12-25 21:55:44 +08:00 committed by GitHub
parent 79c43db20e
commit 0e9c6c062d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<template>
<div ref="wrapperRef" :class="ns.b()">
<div ref="wrapperRef" :class="[ns.b(), ns.is('disabled', disabled)]">
<el-input
v-bind="mergeProps(passInputProps, $attrs)"
ref="elInputRef"

View File

@ -271,6 +271,7 @@ $color-picker-size: map.merge($common-component-size, $color-picker-size);
}
@include when(disabled) {
pointer-events: none;
.#{$namespace}-color-picker__trigger {
cursor: not-allowed;
}

View File

@ -189,6 +189,7 @@
border-color: map.get($input-disabled, 'border');
color: map.get($input-disabled, 'text-color');
cursor: not-allowed;
pointer-events: none;
&:hover,
&:focus {

View File

@ -58,6 +58,7 @@
@include when(disabled) {
cursor: not-allowed;
pointer-events: none;
background-color: getCssVar('fill-color', 'light');
@include mixed-input-border(#{getCssVar('input-tag-disabled-border')});

View File

@ -323,6 +323,7 @@
.#{$namespace}-input__wrapper {
background-color: map.get($input-disabled, 'fill');
cursor: not-allowed;
pointer-events: none;
@include mixed-input-border(map.get($input-disabled, 'border'));
}

View File

@ -15,6 +15,10 @@
map.get($mention, 'shadow')
);
}
@include when(disabled) {
pointer-events: none;
}
}
@include b(mention-dropdown) {

View File

@ -56,6 +56,7 @@
@include when(disabled) {
cursor: not-allowed;
pointer-events: none;
background-color: getCssVar('fill-color', 'light');
color: getCssVar('text-color', 'placeholder');