feat: table style

This commit is contained in:
Alisa | Side.one 2023-05-27 23:53:19 +08:00
parent 9567e08c9a
commit 26e2563c99
2 changed files with 6 additions and 4 deletions

View File

@ -46,7 +46,7 @@ const isPositive = controlledComputed(
<div class=""> <div class="">
<h6 class="text-lg font-semibold mt-2 mb-1"> <h6 class="text-lg font-semibold mt-2 mb-1">
{{ props.stats }} {{ props.stats || '-'}}
</h6> </h6>
<p class="text-sm"> <p class="text-sm">
{{ props.title }} {{ props.title }}

View File

@ -18,13 +18,15 @@ const header = computed(() => {
}); });
</script> </script>
<template> <template>
<div class="overflow-x-auto"> <div class="overflow-x-auto p-4">
<VTable <div
v-if="header.length > 0" v-if="header.length > 0"
class="table table-compact w-full"
density="compact" density="compact"
:height="value.length > 5? '300px': ''" :height="value.length > 5? '300px': ''"
fixed-header fixed-header
hover hover
> >
<thead v-if="thead"> <thead v-if="thead">
<tr> <tr>
@ -44,7 +46,7 @@ const header = computed(() => {
</td> </td>
</tr> </tr>
</tbody> </tbody>
</VTable> </div>
<div v-else class="h-[300px]"></div> <div v-else class="h-[300px]"></div>
</div> </div>