File tree Expand file tree Collapse file tree 4 files changed +47
-26
lines changed Expand file tree Collapse file tree 4 files changed +47
-26
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div >
3+ <div class =" mb-3" >
4+ <TVTable />
5+ </div >
6+
7+
38 <div class =" mb-3" >
49 <TVTable
510 ref =" tvtTableSimple"
6974 :items =" filterItems"
7075 :fields =" fields"
7176 multiple-sortable
77+ multiple-selection
7278 :total-rows =" items.length"
7379 :per-page =" perPage"
7480 :row-select-class =" 'bg-red-500'"
7581 enable-check
7682 @change-page =" changePage"
77- @check-row =" checkRow "
78- @row-clicked =" checkRow "
83+ @check-row =" checkRowMultiple "
84+ @row-clicked =" checkRowMultiple "
7985 >
8086 <template #header-row >
8187 <tr >
Original file line number Diff line number Diff line change 11{
22 "name" : " @bitthecat/tailwind-vue-data-table" ,
3- "version" : " 0.2.4 " ,
3+ "version" : " 0.2.5 " ,
44 "keywords" : [
55 " tailwindcss" ,
66 " customisable" ,
Original file line number Diff line number Diff line change 55
66 <div class =" overflow-auto" >
77 <TTable ref =" TVTABLE" >
8- <TThead >
8+ <!-- No fields set -->
9+ <TThead v-if =" fields.length == 0" >
10+ <TTr class =" divide-x divide-y" >
11+ <TTh />
12+ </TTr >
13+ </TThead >
14+
15+ <TThead v-if =" fields.length !== 0" >
916 <slot v-if =" slots['header-row']" name =" header-row" />
1017 <TTr class =" divide-x divide-y" >
1118 <TTh
5259 </TTh >
5360 </TTr >
5461 </TThead >
55- <TTbody >
62+ <!-- No fields set -->
63+ <TTbody v-if =" fields.length == 0" >
64+ <TTr class =" divide-x divide-y" >
65+ <TTd >
66+ <span class =" font-light flex justify-center mb-3 mt-3" >No fields set</span >
67+ </TTd >
68+ </TTr >
69+ </TTbody >
70+ <TTbody v-else >
5671 <TTr v-if =" busy" >
5772 <!-- Spinner -->
5873 <TTd :colspan =" enableCheck ? fields.length + 1 : fields.length" >
@@ -155,7 +170,7 @@ const slots = useSlots();
155170const props = defineProps ({
156171 items: {
157172 type: [Object , Array ],
158- default : () => {}
173+ default : () => []
159174 },
160175 fields: {
161176 type: Array ,
You can’t perform that action at this time.
0 commit comments