Element Card 组件添加移入移出事件


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<el-card class="box-card" @mouseente native="enter" @mouseleave.native='leave'>
<div slot="header">
<span>卡片名称</span>
<el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
</div>
<div v-for="o in 4" :key="o" class="text item">
{{'列表内容 ' + o }}
</div>
</el-card>

methods: {
enter(){
console.log('enter')
},
leave(){
console.log('leave')
}
},