Skip to content

Commit 093e91b

Browse files
author
黄书伟
committed
实例优化
1 parent 4be9269 commit 093e91b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

examples/doc/table/set-cell-class-name.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
style="width:100%"
99
:columns="columns"
1010
:table-data="tableData"
11-
:on-row-click="onRowClick"
11+
:row-click="rowClick"
1212
:column-cell-class-name="columnCellClass"
1313
row-hover-color="#eee"
1414
row-click-color="#edf7ff"
@@ -52,11 +52,8 @@
5252
{field: 'tel', title: '手机号码', width: 150, titleAlign: 'center',columnAlign:'center',isResize:true},
5353
{field: 'hobby', title: '爱好', width: 150, titleAlign: 'center',columnAlign:'center',titleCellClassName:'title-cell-class-name-test',isResize:true},
5454
{field: 'address', title: '地址', width: 280, titleAlign: 'center',columnAlign:'left',isResize:true}
55-
],
56-
onRowClick(rowIndex,rowData){
57-
console.log(rowIndex);
58-
console.log(rowData);
59-
}
55+
]
56+
6057
}
6158
},
6259
methods:{
@@ -80,6 +77,11 @@
8077
8178
return 'column-cell-class-name-test';
8279
}
80+
},
81+
82+
rowClick(rowIndex,rowData){
83+
console.log(rowIndex);
84+
console.log(rowData);
8385
}
8486
}
8587
}

0 commit comments

Comments
 (0)