<el-select class="publicStyle" v-model="value" placeholder="请选择" @change="change">
<template #prefix>
{{ (options.find(item => item.value=== value) || {}).label}}
</template>
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
.publicStyle .el-input__prefix {
// 这里直接时复制原来的input的样式,给.el-input__prefix加上
position: relative;
visibility: hidden;
}
.publicStyle .el-input__inner {
position: absolute; //这里一定需要给,给内容进行定位
}