feat(components): add custom clear icon (#21699)

* feat(components): add custom clear icon function

added `clear-icon` property to Cascader, Input, and InputTag components to customize the clear icon.

* Update docs/en-US/component/cascader.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/cascader.md

Co-authored-by: btea <2356281422@qq.com>

* feat(components): add custom clear icon use case

* docs(components): reduce cascader clear-icon use case options

* Update packages/components/input-tag/src/input-tag.vue

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/input/src/input.vue

Co-authored-by: btea <2356281422@qq.com>

---------

Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
Coder Goo
2025-08-16 00:47:30 +08:00
committed by GitHub
parent 557d4a18d7
commit bf0568cacf
12 changed files with 178 additions and 67 deletions

View File

@ -74,7 +74,7 @@
@mousedown.prevent="NOOP"
@click="clear"
>
<circle-close />
<component :is="clearIcon" />
</el-icon>
<el-icon
v-if="showPwdVisible"
@ -163,11 +163,7 @@ import {
import { useResizeObserver } from '@vueuse/core'
import { isNil } from 'lodash-unified'
import { ElIcon } from '@element-plus/components/icon'
import {
CircleClose,
Hide as IconHide,
View as IconView,
} from '@element-plus/icons-vue'
import { Hide as IconHide, View as IconView } from '@element-plus/icons-vue'
import {
useFormDisabled,
useFormItem,