vue 点击显示隐藏,鼠标移动上去显示隐藏

1,鼠标点击显示隐藏,样式可以自己调,我就写个dome。


class="min">
"show"> 显示隐藏的内容




 

鼠标移动上去事件:

html:

  
class="min"> <button class="cancelbtn" @mouseover="mouseover(n)" @mouseleave="mouseleave" v-show="isshow & (n == id)" > 取消button >
<button class="followbtn" @mouseover="mouseover(n)" @mouseleave="mouseleave" > 关注
View Code

 

js

View Code

 

css:

.followbtn {
  width: 50px;
  height: 30px;
  text-align: center;
  background-color: coral;
  color: #ffffff;
  border: 0;
}
.cancelbtn {
  width: 50px;
  height: 30px;
  text-align: center;
  background-color: brown;
  color: #ffffff;
  border: 0;
}

效果图:

   vue 点击显示隐藏,鼠标移动上去显示隐藏_第1张图片

你可能感兴趣的:(vue 点击显示隐藏,鼠标移动上去显示隐藏)