<div class="roomMessage" @click="changeStatus($event)">
<div class="flex">
<div class="roomName">
<i class="el-icon-s-home" style="font-size:25px;color:#0281DE;margin-right:7px;"></i>01-013室
<div class="flex-s"><el-tag size="mini">8人间</el-tag><el-tag size="mini">男宿</el-tag></div>
<div class="inDromMessage">
<div class="bor-r"><div class="inDromNum">3</div><div style="font-size:14px;color:#555555;">当前在寝</div>
<div class="bedMessage">
<div class="greenbed">1</div><div class="redbed">2</div></div>
<div class="flex Drombottom">
<div style="look" class="flex-s">
<i class="el-icon-view" style="font-size:19px;color:#B2B2B2;margin-right:7px;"></i>查看</div>
<div>解锁 ( 3 )</div>
//选中 取消
changeStatus(e){
if (e.currentTarget.className.indexOf("choose") == -1) {
e.currentTarget.className = "roomMessage choose"; //选中div样式
} else {
e.currentTarget.className = "roomMessage";//未选中div样式
实际效果就是可以点击选中,再点击取消