File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div class =" py-8 px-8" >
33 <div class =" font-semibold mb-2" >
4- Tailwind Vue DataTable v0.2.6
4+ Tailwind Vue DataTable v0.2.7
55 <span class =" text-xs font-light" >by BitTheCat</span >
66 </div >
77 <div >
Original file line number Diff line number Diff line change 11{
22 "name" : " @bitthecat/tailwind-vue-data-table" ,
3- "version" : " 0.2.6 " ,
3+ "version" : " 0.2.7 " ,
44 "keywords" : [
55 " tailwindcss" ,
66 " customisable" ,
Original file line number Diff line number Diff line change 77 viewBox =" 0 0 24 24"
88 stroke-width =" 1.5"
99 stroke =" currentColor"
10- class =" w-3 h-3"
10+ : class =" size === 'sm' ? ' w-3 h-3' : 'w-4 h-4' "
1111 @click =" changePage(1)"
1212 >
1313 <path stroke-linecap =" round" stroke-linejoin =" round" d =" M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" />
2020 viewBox =" 0 0 24 24"
2121 stroke-width =" 1.5"
2222 stroke =" currentColor"
23- class =" w-3 h-3"
23+ : class =" size === 'sm' ? ' w-3 h-3' : 'w-4 h-4' "
2424 @click =" changePage(undefined, true)"
2525 >
2626 <path stroke-linecap =" round" stroke-linejoin =" round" d =" M15.75 19.5L8.25 12l7.5-7.5" />
2727 </svg >
2828 </div >
2929 <div class =" sm:flex hidden" >
3030 <template v-for =" page of pages " :key =" ` page_${page } ` " >
31- <p class =" text-sm font-medium leading-none cursor-pointer link px-2" :class =" paginationClass(page)" @click =" changePage(page)" >
31+ <p
32+ class =" font-medium leading-none cursor-pointer link px-2"
33+ :class =" `${paginationClass(page)} ${size === 'sm' ? 'text-xs' : 'text-md'}`"
34+ @click =" changePage(page)"
35+ >
3236 {{ page }}
3337 </p >
3438 </template >
4044 viewBox =" 0 0 24 24"
4145 stroke-width =" 1.5"
4246 stroke =" currentColor"
43- class =" w-3 h-3"
47+ : class =" size === 'sm' ? ' w-3 h-3' : 'w-4 h-4' "
4448 @click =" changePage(undefined)"
4549 >
4650 <path stroke-linecap =" round" stroke-linejoin =" round" d =" M8.25 4.5l7.5 7.5-7.5 7.5" />
5357 viewBox =" 0 0 24 24"
5458 stroke-width =" 1.5"
5559 stroke =" currentColor"
56- class =" w-3 h-3"
60+ : class =" size === 'sm' ? ' w-3 h-3' : 'w-4 h-4' "
5761 @click =" changePage(totPages)"
5862 >
5963 <path stroke-linecap =" round" stroke-linejoin =" round" d =" M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" />
@@ -83,6 +87,11 @@ const props = defineProps({
8387 type: Number ,
8488 default: 1
8589 },
90+ size: {
91+ type: String ,
92+ default: ' md' ,
93+ validator : (value ) => [' sm' , ' md' ].includes (value)
94+ }
8695})
8796const emit = defineEmits ([' update:currentPage' ])
8897
Original file line number Diff line number Diff line change 11<template >
2- <div v-if =" !hidePagination && totalRows != 0 && !hideSummary && !busy" class =" flex items-center justify-end mr-2 mb-2 text-xs font-small text- body" >
3- <span >{{ getSummary() }}</span >
2+ <div v-if =" !hidePagination && totalRows != 0 && !hideSummary && !busy" class =" flex items-center justify-end mr-2 mb-2 text-body" >
3+ <span :class = " size === 'sm' ? 'text-xs' : 'text-md' " >{{ getSummary() }}</span >
44 </div >
55
66 <div class =" overflow-auto" >
144144 v-model:currentPage =" localCurrentPage"
145145 :total-rows =" localTotalRows"
146146 :per-page =" perPage"
147+ :size =" size"
147148 />
148149</template >
149150
@@ -207,6 +208,11 @@ const props = defineProps({
207208 type: String ,
208209 default: ' Displaying _STR_FROM_ to _STR_TO_ of _STR_TOTAL_ items'
209210 },
211+ size: {
212+ type: String ,
213+ default: ' md' ,
214+ validator : (value ) => [' sm' , ' md' ].includes (value)
215+ }
210216})
211217
212218const emit = defineEmits ([
You can’t perform that action at this time.
0 commit comments