elementui输入框前面加字
时间: 2023-08-24 07:09:12 浏览: 375
jQuery数字加减输入框代码
对于element-ui输入框前面加字的需求,可以使用prefix-icon属性来实现。只需在el-input标签中添加prefix-icon属性,并指定对应的图标类名即可。例如,如果要在输入框前面加入一个搜索图标,可以这样写:
```html
<el-input prefix-icon="iconfont icon-sousuo" v-model="searchTableInfo" placeholder="请输入姓名" style="width:240px"></el-input>
```
其中,iconfont icon-sousuo是图标的类名,您可以根据需要替换成合适的图标类名。这样就可以在输入框前面加上字了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [vue + elementUI 给input输入框添加 字体小图标](https://blog.csdn.net/qq_43271452/article/details/88662668)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [ElementUI输入框后加固定的自定义内容(数值单位等)](https://blog.csdn.net/weixin_44131922/article/details/117908661)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文