Skip to content

Commit dd1fc03

Browse files
committed
fixed selected Row #12, added noItemText prop #13
1 parent f8da6e5 commit dd1fc03

File tree

6 files changed

+95
-2517
lines changed

6 files changed

+95
-2517
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Tailwind Vue Data Table
22

3+
![](https://img.shields.io/badge/Vue3-318534?logo=vuedotjs&logoColor=white&style=flat-square)
4+
![](https://img.shields.io/badge/Tailwind-6899C7?logo=tailwindcss&logoColor=white&style=flat-square)
5+
36
Simple DataTable with slots, class and style modification for tr and td, sortable by columns (only graphics with click event).
47

58
Contains the TVPaginator component that can be disabled via prop or used in stand-alone mode.

dev/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="py-8 px-8">
33
<div class="font-semibold mb-2">
4-
Tailwind Vue DataTable v0.2.3
4+
Tailwind Vue DataTable v0.2.4
55
<span class="text-xs font-light">by BitTheCat</span>
66
</div>
77
<div>

dev/TableShow.vue

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,44 @@
11
<template>
22
<div>
3+
<div class="mb-3">
4+
<TVTable
5+
ref="tvtTableSimple"
6+
:items="[]"
7+
:fields="fieldsSimple"
8+
:busy="busy"
9+
:spinner-class="'text-red-500'"
10+
multiple-selection
11+
enable-check
12+
>
13+
<template v-if="customText" #no-items>
14+
Overwrite No Item
15+
</template>
16+
</TVTable>
17+
18+
19+
<input
20+
class="border mt-2 p-1 rounded bg-gray-300 text-sm"
21+
type="button"
22+
:value="`Test custom message: ${customText ? 'on' : 'off' }`"
23+
@click="customText = !customText"
24+
/>
25+
26+
27+
<input
28+
class="border ml-2 mt-2 p-1 rounded bg-gray-300 text-sm"
29+
type="button"
30+
:value="`Test busy: ${busy ? 'on' : 'off' }`"
31+
@click="busy = !busy"
32+
/>
33+
</div>
34+
335
<div class="mb-3">
436
<span class="text-xs"> Simple </span>
537

638
<TVTable
739
ref="tvtTableSimple"
840
:items="cloneItems"
941
:fields="fieldsSimple"
10-
:busy="busy"
1142
:spinner-class="'text-red-500'"
1243
multiple-selection
1344
enable-check
@@ -28,8 +59,6 @@
2859
</tr>
2960
</template>
3061
</TVTable>
31-
32-
<input class="border mt-2 p-1 rounded bg-gray-300 text-sm" type="button" :value="`Test busy: ${busy ? 'on' : 'off' }`" @click="busy = !busy" />
3362
</div>
3463
<hr>
3564
<div>
@@ -161,6 +190,7 @@ const items = ref([
161190
])
162191
163192
const busy = ref(false)
193+
const customText = ref(false)
164194
165195
const currentPage = ref(1)
166196

0 commit comments

Comments
 (0)