2025-06-24 00:35:17 +02:00

64 lines
1017 B
Vue

<template>
<th
class="ds-table-head-col"
:class="[
align && `ds-table-head-col-${align}`
]">
<slot>
{{ label }}
</slot>
</th>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
/**
* Used in combination with the table component to create data tables.
* @version 1.0.0
* @see DsTable
* @private
*/
export default defineComponent({
name: 'DsTableHeadCol',
inject: {
$parentTable: {
default: null
}
},
props: {
/**
* The column value
*/
label: {
type: [Number, String, Array, Object],
default() {
return null
}
},
/**
* The column width
*/
width: {
type: [String, Number, Object],
default: null
},
/**
* The column align
* @options left|center|right
*/
align: {
type: String,
default: null,
validator: value => {
return value.match(/(left|center|right)/)
}
}
},
computed: {},
});
</script>