|
|
@@ -15,13 +15,7 @@ export function getTableEvent<T>(param: TableEventCB) {
|
|
|
return {
|
|
|
onClick: () => { // 表格点击
|
|
|
selectedRow.value = record
|
|
|
- const value = expandedRowKeys.value;
|
|
|
- if (value.length) {
|
|
|
- const key = value[0];
|
|
|
- expandedRowKeys.value = key === index.toString() ? [] : [`${index}`];
|
|
|
- } else {
|
|
|
- expandedRowKeys.value = [`${index}`]
|
|
|
- }
|
|
|
+ expandedRowKeys.value = (record as any).key
|
|
|
param.clickCB && param.clickCB()
|
|
|
},
|
|
|
// onDblclick: () => { // 双击
|