flameresttable 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -6
- package/src/Table/Paginator.vue +4 -3
package/package.json
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flameresttable",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"main": "./src/plugin.ts",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/FlameArt/resttable.git"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"dev": "vite",
|
|
11
|
-
"build": "vue-tsc --noEmit && vite build",
|
|
12
|
-
"preview": "npm run build && vite preview",
|
|
13
10
|
"install/update": "npm i && npm update --save",
|
|
14
|
-
"push and publish": "git push && npm --no-git-tag-version version patch && npm publish"
|
|
15
|
-
"android": "npm run build && npx cap add android && npx cap sync && npx cap open android"
|
|
11
|
+
"push and publish": "git push && npm --no-git-tag-version version patch && npm publish"
|
|
16
12
|
},
|
|
17
13
|
"dependencies": {
|
|
18
14
|
"@vuepic/vue-datepicker": "^7.2.1",
|
package/src/Table/Paginator.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
nav.relative.z-0.w-full.fc.flex-wrap.rounded-md.-space-x-px(aria-label='Pagination' @click="")
|
|
3
|
-
a.relative.inline-flex.items-center.px-2.py-2.rounded-l-md.border.border-gray-300.bg-white.text-sm.font-medium.text-gray-500(
|
|
3
|
+
a.relative.inline-flex.items-center.px-2.py-2.rounded-l-md.border.border-gray-300.bg-white.text-sm.font-medium.text-gray-500(@click="goPage(props.table.Pager.page-1)" :class="props.table.Pager.page === 1 ? 'opacity-30' : 'cursor-pointer'" class='hover:bg-gray-50')
|
|
4
4
|
span.sr-only Previous
|
|
5
5
|
// Heroicon name: solid/chevron-left
|
|
6
6
|
svg.h-5.w-5(xmlns='http://www.w3.org/2000/svg' viewbox='0 0 20 20' fill='currentColor' aria-hidden='true')
|
|
@@ -9,7 +9,7 @@ nav.relative.z-0.w-full.fc.flex-wrap.rounded-md.-space-x-px(aria-label='Paginati
|
|
|
9
9
|
a.cursor-pointer.bg-white.border-gray-300.text-gray-500.relative.inline-flex.items-center.px-4.py-2.border.text-sm.font-medium(v-for="page in props.table.Pager.count" class="hover:bg-gray-50" :class="props.table.Pager.page === page ? 'z-10 bg-indigo-50 border-indigo-500 text-indigo-600' : ''" @click="goPage(page)")
|
|
10
10
|
| {{ page }}
|
|
11
11
|
//span.relative.inline-flex.items-center.px-4.py-2.border.border-gray-300.bg-white.text-sm.font-medium.text-gray-700 ...
|
|
12
|
-
a.relative.inline-flex.items-center.px-2.py-2.rounded-r-md.border.border-gray-300.bg-white.text-sm.font-medium.text-gray-500(
|
|
12
|
+
a.relative.inline-flex.items-center.px-2.py-2.rounded-r-md.border.border-gray-300.bg-white.text-sm.font-medium.text-gray-500(@click="goPage(props.table.Pager.page+1)" :class="props.table.Pager.page >= props.table.Pager.count ? 'opacity-30' : 'cursor-pointer'" class='hover:bg-gray-50')
|
|
13
13
|
span.sr-only Next
|
|
14
14
|
// Heroicon name: solid/chevron-right
|
|
15
15
|
svg.h-5.w-5(xmlns='http://www.w3.org/2000/svg' viewbox='0 0 20 20' fill='currentColor' aria-hidden='true')
|
|
@@ -35,7 +35,7 @@ const state = reactive({
|
|
|
35
35
|
|
|
36
36
|
// Входящие данные компонента
|
|
37
37
|
const props = defineProps<{
|
|
38
|
-
table:
|
|
38
|
+
table: FlameTable<any>
|
|
39
39
|
}>()
|
|
40
40
|
|
|
41
41
|
|
|
@@ -45,6 +45,7 @@ onMounted(async () => {
|
|
|
45
45
|
})
|
|
46
46
|
|
|
47
47
|
const goPage = (page: number) => {
|
|
48
|
+
if (page > props.table.Pager.count || page <= 0) return;
|
|
48
49
|
// eslint-disable-next-line vue/no-mutating-props
|
|
49
50
|
props.table.Pager.page = page;
|
|
50
51
|
props.table.update();
|