Skip to content

Commit

Permalink
Merge pull request #10 from BitTheCat/feat/new-features
Browse files Browse the repository at this point in the history
Added sub components for table style v0.2.3
  • Loading branch information
BitTheCat authored Dec 13, 2022
2 parents a539d6b + 889de4a commit 9014f9d
Show file tree
Hide file tree
Showing 15 changed files with 2,118 additions and 816 deletions.
2 changes: 1 addition & 1 deletion dev/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="py-8 px-8">
<div class="font-semibold mb-2">
Tailwind Vue DataTable v0.2.2
Tailwind Vue DataTable v0.2.3
<span class="text-xs font-light">by BitTheCat</span>
</div>
<div>
Expand Down
20 changes: 12 additions & 8 deletions dev/TableShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
:fields="fieldsSimple"
:busy="busy"
:spinner-class="'text-red-500'"
@check-row="checkRow"
@row-clicked="checkRow"
multiple-selection
enable-check
>
<template #header-row>
<tr>
<td colspan="2" />
<td colspan="1">Header1</td>
<td colspan="2" class="bg-red-500" />
<td colspan="2">Header1</td>
</tr>
</template>


<template #footer-row>
<tr>
<td colspan="1" />
<td colspan="1" />
<td colspan="1">Footer</td>
<td colspan="1" class="bg-red-500" />
<td colspan="1" class="bg-green-500"/>
<td colspan="2">Footer</td>
</tr>
</template>
</TVTable>
Expand Down Expand Up @@ -176,7 +176,7 @@ const changePage = (values) => {
const selectRow = ref([])
const checkRow = (value) => {
const checkRowMultiple = (value) => {
if (selectRow.value.includes(value)) {
let index = selectRow.value.indexOf(value)
selectRow.value.splice(index, 1)
Expand All @@ -185,4 +185,8 @@ const checkRow = (value) => {
}
}
const checkRow = (value) => {
selectRow.value = selectRow.value === value ? null : value
}
</script>
4 changes: 3 additions & 1 deletion dev/css/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import "tailwindcss/utilities";

@import "../../src/css/app.css"
Loading

0 comments on commit 9014f9d

Please sign in to comment.