shayloyuki

科技是第一生产力

 

双击表格行,弹出对话框

需求

双击表格某行数据,弹出对话框。

vxe-table 有组件可以实现这个功能。

但如果用封装的组件,怎样实现呢?

分析

已知 vue 中 @dblclick 是双击事件(Vue双击事件),但无法直接在组件上使用。

antd 使用 onRow 属性

参考:antd中Table双/单击行事件

image

el-table 使用 @row-dblclick 事件

参考:element UI el-table表格添加行双击事件

posted on 2023-08-10 10:56  shayloyuki  阅读(355)  评论(0编辑  收藏  举报

导航