mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* 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>
26 lines
402 B
Vue
26 lines
402 B
Vue
<template>
|
|
<el-cascader
|
|
:options="options"
|
|
clearable
|
|
:clear-icon="CloseBold"
|
|
placeholder="Custom clear icon"
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { CloseBold } from '@element-plus/icons-vue'
|
|
|
|
const options = [
|
|
{
|
|
value: 'guide',
|
|
label: 'Guide',
|
|
children: [
|
|
{
|
|
value: 'disciplines',
|
|
label: 'Disciplines',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
</script>
|