说明:
1、type="selection"选中事件
2、@cell-mouse-enter鼠标移到列表触发事件
问题:执行@cell-mouse-enter的时候会直接取消type="selection"选中事件。
解决方法:
cellMouseEnter(row, column, cell, event) {
let Arr = JSON.parse(JSON.stringify(this.listData));
for (let index = 0; index < Arr.length; index++) {
const element = Arr[index];
// 匹配滑过的当前行
if (element.id === row.id) {
element["hoverFlag1"] = true;
} else {
element["hoverFlag1"] = false;
}
}
this.listData = JSON.parse(JSON.stringify(Arr));
let rows = [];
//获取选中数据dataonLineListSelections
if (this.dataonLineListSelections.length > 0) {
for (let i = 0; i < this.listData.length; i++) {
if (this.listData[i].id == this.dataonLineListSelections[0].id) {
rows.push(this.listData[i]);
this.$nextTick(() => {
rows.forEach(row => {
//重新定义type="selection"
this.$refs.table.toggleRowSelection(row);
});
});
}
}
}
}
el-table利用:row-style="rowClass"设置指定行变色
el-table表格显示selection多选时对某些复选框设置禁止选中
el-table表格实现多选功能(全选/指定选中/取消选中)
上面是“el-table解决@cell-mouse-enter和type="selection"同时存在bug”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_2172.html
workflows工作流
文生图工作流:一幅海底睡莲,碧海蓝天comfyui工
池塘边的大熊猫ComfyUI工作流
一座精致透明的白瓷人物雕塑comfyui工作流
星空星域星球comfyui工作流
一杯咖啡蒸汽形成云ComfyUI工作流
停在音乐节露营地的一辆复古大众巴士由羊毛制成
一个巨大的漆黑的蟹王ComfyUI工作流
一位美丽的女士在座机上讲话ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

日历设置每个月颜色都不一样
js+css3做一个灯泡开灯关灯效果
3d文字动画效果
做一个好玩的时钟翻牌效果
利用CSS3做一个星级评分样式
自动打字效果(惊喜在后面)
纯CSS饼图效果











