@ flowbite-svelte-plugins/ 数据表
使用数据表组件搜索、排序、过滤和粘贴您的网络应用程序行和列的表格数据.
根据麻省理工学院许可证,数据表组成部分实例是开源的,其依据是 简单数据表存储器 从GitHub.
安装
pnpm i -D @flowbite-svelte-plugins/datatable simple-datatables
应用程序.cs
@source "../node_modules/simple-datatables/dist";
@source "../node_modules/@flowbite-svelte-plugins/datatable/dist";
.datatable-pagination .datatable-active a,
.datatable-pagination .datatable-active a:focus,
.datatable-pagination .datatable-active a:hover,
.datatable-pagination .datatable-active button,
.datatable-pagination .datatable-active button:focus,
.datatable-pagination .datatable-active button:hover {
background-color: #ffe4de;
cursor: default;
}
.datatable-wrapper .datatable-table tbody tr.selected {
background-color: #fff1ee !important;
}
默认数据表
使用此示例来显示带有默认排序和页化功能的表格数据 .
<script lang="ts">
import { Table } from '@flowbite-svelte-plugins/datatable';
import items from './data/sample.json';
</script>
<Table {items} />