hrms-user/src/modules/06_evaluate/components/viewstep/tableStep1.vue

59 lines
1.1 KiB
Vue
Raw Normal View History

2023-12-18 10:05:40 +07:00
<script setup lang="ts">
const props = defineProps({
columns: {
type: Array as () => any[],
require: true,
},
2023-12-22 16:00:05 +07:00
row: {
type: Array as () => any[],
require: true,
},
2023-12-18 10:05:40 +07:00
});
</script>
<template>
<div class="q-pa-sm row col-12">
2024-06-05 11:36:57 +07:00
<d-table
ref="table"
flat
bordered
:columns="props.columns"
:rows="props.row"
dense
:rows-per-page-options="[10, 25, 50, 100]"
virtual-scroll
class="row col-12"
2024-06-05 11:36:57 +07:00
:style="$q.screen.lt.sm ? 'width: 80vw' : 'width: 50vw;'"
>
2024-06-05 11:36:57 +07:00
</d-table>
</div>
2023-12-18 10:05:40 +07:00
</template>
<style lang="scss" scoped>
.custom-header-table {
height: auto;
.q-table tr:nth-child(odd) td {
background: white;
}
.q-table tr:nth-child(even) td {
background: #f8f8f8;
}
.q-table thead tr {
background: #ecebeb;
}
.q-table thead tr th {
position: sticky;
}
/* this will be the loading indicator */
.q-table thead tr:last-child th {
/* height of all previous header rows */
top: 48px;
}
.q-table thead tr:first-child th {
top: 0;
}
}
</style>