1.若是element-ui 则使用 prefix-icon="Search" 直接引用
<el-input prefix-icon="Search" v-model="phone" style="font-size: 12px;width: 200px;margin-left:10px;height: 32px" placeholder="请输入电话查询" />
2.若是element-plus则进行输入
:prefix-icon="Search" 来进行引用,并添加引用
import {Search} from "@element-plus/icons";
即
<el-input :prefix-icon="Search" v-model="username" style="font-size: 12px;width: 200px;height: 32px" placeholder="请输入用户名查询" />
希望能对你有所帮助~
注:使用前要先配置好main.js噢