Files
admin_core/src/components/treeGrid/component/subThead.vue
张成 2e1cd65b07 init
2025-10-08 15:10:33 +08:00

32 lines
565 B
Vue

<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>