之前用过一次,不经常用,忘记了,所以记录一下自己留着备用
@mouseenter="bcolor($event)"
@mouseleave="wcolor($event)"
这2个为移入、移除触发事件
bcolor: function(e){
e.target.style.backgroundColor = "#efefef"
}
wcolor: function(e){
e.target.style.backgroundColor = "#fff"
}
修改背景颜色的2个方法