el-select需要取数组内所有值
- el-select必须有value-key,不然会全部选中
- el-options绑定的value值为整个item,这样就可以取到全部参数
<el-select v-model="setnumber" placeholder="请选择集数" value-key="id" @change="handlesidClick($event)">
<el-option v-for="item in videoList" :key="item.id" :label="item.title" :value="item">
</el-option>
</el-select>
handlesidClick(e){
console.log(e)
},
el-table点击行给行添加样式,但是hover会覆盖样式的问题
- success-row是选中之后的样式
- 去除原本的hover样式,注意success-row要放在去除hover样式的css下面
<el-table border :data="OrdinaryRechargePlatform" style="width:100%" @row-click="handleOrdinaryViewNumClick" :row-class-name="hightLightPlatformClassName">
</el-table>
<script>
hightLightPlatformClassName({row, rowIndex}) {
return row.payer_amount == this.setprice?'success-row':''
},
</script>
<style lang="scss">
.el-table tbody tr:hover > td {
background-color: transparent !important;
}
.success-row {
background-color: #1890ff !important;
color: #fff;
}
</style>