[添加] 给rowClick和rowDoubleClick事件添加第二个回调参数evt原始事件,用于行选后的事件处理
This commit is contained in:
parent
49261dd2e6
commit
6ab9b84c7b
@ -93,12 +93,12 @@ const change = function (page: any) {
|
|||||||
emit("change", page);
|
emit("change", page);
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowClick = function (data: any) {
|
const rowClick = function (data: any,evt:MouseEvent) {
|
||||||
emit("row", data);
|
emit("row", data,evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowDoubleClick = function (data: any) {
|
const rowDoubleClick = function (data: any,evt:MouseEvent) {
|
||||||
emit("row-double", data);
|
emit("row-double", data,evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 打印 table 数据
|
// 打印 table 数据
|
||||||
@ -288,8 +288,8 @@ onMounted(() => {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<template v-for="data in tableDataSource" :key="data">
|
<template v-for="data in tableDataSource" :key="data">
|
||||||
<tr
|
<tr
|
||||||
@click.stop="rowClick(data)"
|
@click.stop="rowClick(data,$event)"
|
||||||
@dblclick.stop="rowDoubleClick(data)"
|
@dblclick.stop="rowDoubleClick(data,$event)"
|
||||||
>
|
>
|
||||||
<!-- 复选框 -->
|
<!-- 复选框 -->
|
||||||
<td v-if="checkbox" class="layui-table-col-special">
|
<td v-if="checkbox" class="layui-table-col-special">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user