vant 内嵌套 element-ui 组件样式修改失败的问题
有些移动端内,会要求使用 element 下拉框来做选择题。 而 vant 内嵌 element 的时候,内嵌 element-ui 的时候,原本添加类名的 popper-class 字段会失效,此时重开一个 写入样式就能生效。
<van-field v-model="temp.deductionStandard" label="扣分标准" :show-error-message="false"
v-if="this.temp.bigType == 1">
<template #input>
<el-select v-model="temp.deductionStandard" clearable filterable popper-class="my-el-select">
<el-option v-for="item in deductionStandardList" :key="item.id" :label="item.deductionStandard"
:value="item.deductionStandard" />
</el-select>
</template>
</van-field>
<style>
.my-el-select {
width: 60vw;
}
</style>