先安装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>

Logo

前往低代码交流专区

更多推荐