add spanMethod to base-table
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
<template>
|
||||
<div class="base-table">
|
||||
<el-table :data="data" style="width: 100%" fit border :header-cell-style="{ background: '#FAFAFA', color: '#606266', height: '40px' }" :max-height="maxHeight">
|
||||
<el-table
|
||||
:data="data"
|
||||
style="width: 100%"
|
||||
fit
|
||||
border
|
||||
:header-cell-style="{ background: '#FAFAFA', color: '#606266', height: '40px' }"
|
||||
:max-height="maxHeight"
|
||||
:span-method="spanMethod || null"
|
||||
>
|
||||
<!-- 表格头定义 -->
|
||||
<template v-for="(head, idx) in tableHeadConfigs">
|
||||
<!-- 带type的表头 -->
|
||||
@@ -61,6 +69,13 @@ export default {
|
||||
maxHeight: {
|
||||
type: Number,
|
||||
default: 500
|
||||
},
|
||||
spanMethod: {
|
||||
type: Function,
|
||||
default: () => {
|
||||
() => [0, 0]
|
||||
},
|
||||
required: false
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
|
||||
Reference in New Issue
Block a user