Background: el-select can add units in the drop-down options through a custom template, but the units cannot be displayed after selection
achieve effect
implement the code
html
<el-select
v-model="form.day"
class="select-prefix"
>
<el-option label="1" :value="1" />
<el-option label="2" :value="2" />
<el-option label="3" :value="3" />
<el-option label="4" :value="4" />
<template slot="prefix">天</template>
</el-select>
css
.select-prefix .el-input__prefix{
right: 30px;
cursor: pointer;
}