给el-select 添加popper-class=\’selectFrom\’ 根据这个class进行背景色修改 代码如下
[code] // 赋值class popper-class=\"selectFrom\"<el-selectpopper-class=\"selectFrom\"v-model=\"activityNum\"placeholder=\"语言切换\"@change=\"selectModel($event)\"><el-optionv-for=\"(item, index) in numtype\":label=\"item.name\":value=\"item.word\":key=\"index\"></el-option></el-select><style lang=\"less\">.selectFrom {color: #fff;border: 1px solid #176168 !important;// background: #176168 !important;.el-select-dropdown__list {text-align: right;background: #176168 !important;}.el-select-dropdown__item {color: #fff;background: #176168 !important;}.el-select-dropdown__item.hover,.el-select-dropdown__item:hover {background: #1b7f5d !important;}}