<el-form-item label="角色:" prop="username"><el-selectv-model="value"placeholder="Select"popper-class="role_select"><el-option disabled><div class="flex"><div style="width: 150px">角色</div><div>特权</div></div></el-option><el-optionv-for="item in roleList":key="item.roleid":label="item.roleid":value="item.roleid"><div class="flex"><div style="width: 150px">{{ item.roleid }}</div><el-spacewrapstyle="width: 500px;white-space: normal;word-wrap: break-word;"><el-tagv-for="item1 in item.privs":key="item1"plaintype="primary"size="small">{{ item1 }}</el-tag></el-space></div></el-option></el-select></el-form-item>```css部分:
不加scoped
<style lang="scss">
.role_select {height: unset !important;.el-select-dropdown__item {height: unset;line-height: unset;border-bottom: 1px solid padding: 5px 30px 5px;}
}
</style>