|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
- <el-table :class="customClass" stripe :data="data.data" :height="height" style="width: 100%" @cell-click="onClick">
|
|
|
|
|
|
+ <el-table :class="customClass" stripe :data="data.data" :height="height" style="width: 100%" @cell-click="onClick" @header-click="onHeaderClick">
|
|
<template v-for="col in data.column" :key="col">
|
|
<template v-for="col in data.column" :key="col">
|
|
- <el-table-column v-if="col.child && col.child.length > 0" :label="col.name">
|
|
|
|
|
|
+ <el-table-column v-if="col.child && col.child.length > 0" :label="col.name" :key="col">
|
|
<el-table-column
|
|
<el-table-column
|
|
v-for="sub in col.child"
|
|
v-for="sub in col.child"
|
|
:key="sub"
|
|
:key="sub"
|
|
@@ -142,6 +142,9 @@ export default {
|
|
onClick(row, column, cell, event) {
|
|
onClick(row, column, cell, event) {
|
|
if (column.rawColumnKey.click) column.rawColumnKey.click(event, row);
|
|
if (column.rawColumnKey.click) column.rawColumnKey.click(event, row);
|
|
},
|
|
},
|
|
|
|
+ onHeaderClick(column, event) {
|
|
|
|
+ if (column.rawColumnKey.headerClick) column.rawColumnKey.headerClick(event, column, this.data.data);
|
|
|
|
+ },
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.currentPage = val;
|
|
this.currentPage = val;
|
|
this.$emit("onPagging", {
|
|
this.$emit("onPagging", {
|