el-input #prefix
时间: 2023-10-07 21:13:33 浏览: 103
el-input组件的#prefix属性可以在el-input前面添加图标。你可以使用以下代码示例来实现这个效果:
```html
<el-input placeholder="请输入内容">
<template #prefix>
<i class="el-icon-search"></i>
</template>
</el-input>
```
在这个示例中,我们在el-input组件的前面添加了一个搜索图标。你可以根据需要修改图标的样式和类名。
#### 引用[.reference_title]
- *1* [定制el-select样式(神奇的el-input__prefix)](https://blog.csdn.net/hj_001/article/details/116055241)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [el-input输入框,el-input 搜索框 描述框 文本框 常用样式总结](https://blog.csdn.net/qq_45300842/article/details/119204425)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文