样式类绑定:
使用对象:
computed:{
divClasses:function(){
return {
red:this.attachRed,
blue:!this.attachRed
}
}
}
使用命名:
css中定义.red,.green,.blue样式。
data:{
attachRed:false,
color:'greed'
}
动态设置样式,不使用CSS类:
computed:{
mystyle:function(){
return {
backgroundColor:this.color,
width:this.width + 'px'
}
}
}
数组语法设置元素样式
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款