element-plus输入框显示图标
先安装icon# NPM$ npm install @element-plus/icons-vue# Yarn$ yarn add @element-plus/icons-vue# pnpm$ pnpm install @element-plus/icons-vue<template><div class="page"><!--标题--><lstitle
·
先安装icon
# NPM
$ npm install @element-plus/icons-vue
# Yarn
$ yarn add @element-plus/icons-vue
# pnpm
$ pnpm install @element-plus/icons-vue
<template>
<div class="page">
<!--标题-->
<lstitle title="基础设置" enTitle="Installation location"></lstitle>
<!-- 条件框 -->
<div class="conddiv">
<el-input v-model="positioninp" class="w-50 m-2" placeholder="位置搜索" :prefix-icon="Search" style="width:200px;">
<template #prefix>
<el-icon class="el-icon--left">
<Search />
</el-icon>
</template>
</el-input>
</div>
</div>
</template>
<script>
import { Search } from '@element-plus/icons-vue'
export default {
components: {
Search
},
data() {
return {
positioninp: "",//位置
}
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 20px;
}
</style>
更多推荐
已为社区贡献9条内容
所有评论(0)