init
This commit is contained in:
31
src/components/treeGrid/component/subThead.vue
Normal file
31
src/components/treeGrid/component/subThead.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<thead class="ivu-table-header">
|
||||
<tr>
|
||||
<th v-for="(col, index) in columns" :key="col.key || index" :style="headerStyle(col)">
|
||||
<div class="ivu-table-cell">
|
||||
<span>{{ col.title }}</span>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SubThead',
|
||||
props: {
|
||||
columns: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
headerStyle(col) {
|
||||
const align = col && col.align ? col.align : 'center'
|
||||
return { textAlign: align }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user