refs #6416 feat: VnTable
This commit is contained in:
parent
5c5f154c3e
commit
a1414cbefd
|
@ -0,0 +1,24 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const $props = defineProps({
|
||||
columns: { type: Object, require: true, default: null },
|
||||
rows: { type: Object, require: true, default: null },
|
||||
});
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
<template>
|
||||
<QTable :columns="$props.columns" :rows="$props.rows" flat hide-pagination>
|
||||
<template #header="props">
|
||||
<QTr :props="props" class="bg">
|
||||
<QTh v-for="col in props.cols" :key="col.name" :props="props">
|
||||
{{ t(col.label) }}
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
<template #bottom-row>
|
||||
<slot name="bottom-row"></slot>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
<style lang="scss" scoped></style>
|
Loading…
Reference in New Issue