classcard-ui 0.2.212 → 0.2.213
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/dist/classcard-ui.common.js +71 -73
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +71 -73
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CPagination/CPagination.vue +75 -71
package/package.json
CHANGED
|
@@ -1,80 +1,84 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div class="-
|
|
4
|
-
<a
|
|
5
|
-
@click="currentPageNumber == '1' ? '' : goToPreviousPage()"
|
|
6
|
-
class="pt-4 pr-1 inline-flex items-center text-sm font-medium"
|
|
7
|
-
:class="
|
|
8
|
-
currentPageNumber == '1'
|
|
9
|
-
? 'text-gray-400 pointer-events-none'
|
|
10
|
-
: 'text-gray-500 hover:text-gray-700 group cursor-pointer'
|
|
11
|
-
"
|
|
12
|
-
>
|
|
13
|
-
<c-icon
|
|
14
|
-
name="arrow-narrow-left-solid"
|
|
15
|
-
class="h-5 w-5 mr-3"
|
|
16
|
-
:class="
|
|
17
|
-
currentPageNumber == '1'
|
|
18
|
-
? 'text-gray-400 pointer-events-none'
|
|
19
|
-
: 'text-gray-500 group-hover:text-gray-800'
|
|
20
|
-
"
|
|
21
|
-
type="solid"
|
|
22
|
-
></c-icon>
|
|
2
|
+
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
|
3
|
+
<div class="flex-1 flex justify-between sm:hidden">
|
|
4
|
+
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
|
23
5
|
Previous
|
|
24
6
|
</a>
|
|
25
|
-
|
|
26
|
-
<div class="hidden md:-mt-px md:flex">
|
|
27
|
-
<div
|
|
28
|
-
v-for="page in pageRange"
|
|
29
|
-
:key="page"
|
|
30
|
-
class="text-gray-500 hover:text-gray-700 px-4 inline-flex items-center text-sm font-medium group"
|
|
31
|
-
:class="[
|
|
32
|
-
page == currentPageNumber
|
|
33
|
-
? 'border-indigo-500 border-t-4 cursor-pointer'
|
|
34
|
-
: 'hover:border-t-4',
|
|
35
|
-
page === '...' ? 'cursor-text hover:border-t-4 hover:border-transparent' : '',
|
|
36
|
-
page !== currentPageNumber && page !== '...'
|
|
37
|
-
? 'hover:border-gray-300 hover:border-t-4 cursor-pointer'
|
|
38
|
-
: '',
|
|
39
|
-
]"
|
|
40
|
-
@click="changePage(page)"
|
|
41
|
-
>
|
|
42
|
-
<div class="pt-4 group-hover:-mt-1" v-if="page === '...'">...</div>
|
|
43
|
-
<div v-else-if="page == currentPageNumber" class="pt-3.5 text-indigo-600">
|
|
44
|
-
{{ page }}
|
|
45
|
-
</div>
|
|
46
|
-
<div class="pt-4 group-hover:-mt-1" v-else>
|
|
47
|
-
{{ page }}
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<div class="-mt-px w-0 flex-1 flex justify-end">
|
|
52
|
-
<a
|
|
53
|
-
@click="currentPageNumber == lastPageNumber ? '' : goToNextPage()"
|
|
54
|
-
class="pt-4 pl-1 inline-flex items-center text-sm"
|
|
55
|
-
:class="
|
|
56
|
-
currentPageNumber == lastPageNumber
|
|
57
|
-
? 'text-gray-400 pointer-events-none'
|
|
58
|
-
: 'text-gray-500 hover:text-gray-700 group cursor-pointer'
|
|
59
|
-
"
|
|
60
|
-
>
|
|
7
|
+
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
|
61
8
|
Next
|
|
62
|
-
<c-icon
|
|
63
|
-
class="ml-3 h-5 w-5"
|
|
64
|
-
:class="
|
|
65
|
-
currentPageNumber == lastPageNumber
|
|
66
|
-
? 'text-gray-400 pointer-events-none'
|
|
67
|
-
: 'text-gray-500 group-hover:text-gray-800'
|
|
68
|
-
"
|
|
69
|
-
name="arrow-narrow-right-solid"
|
|
70
|
-
type="solid"
|
|
71
|
-
></c-icon>
|
|
72
9
|
</a>
|
|
73
10
|
</div>
|
|
74
|
-
|
|
11
|
+
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
|
12
|
+
<div>
|
|
13
|
+
<p class="text-sm text-gray-700">
|
|
14
|
+
Showing
|
|
15
|
+
<span class="font-medium">1</span>
|
|
16
|
+
to
|
|
17
|
+
<span class="font-medium">10</span>
|
|
18
|
+
of
|
|
19
|
+
<span class="font-medium">97</span>
|
|
20
|
+
results
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
|
25
|
+
<div class="hidden md:-mt-px md:flex">
|
|
26
|
+
<div href="#"
|
|
27
|
+
@click="currentPageNumber == '1' ? '' : goToPreviousPage()"
|
|
28
|
+
class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-r-0 border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
|
29
|
+
:class="
|
|
30
|
+
currentPageNumber == '1'
|
|
31
|
+
? 'text-gray-400 pointer-events-none'
|
|
32
|
+
: 'text-gray-500 hover:text-gray-700 group cursor-pointer'
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<span class="sr-only">Previous</span>
|
|
36
|
+
<!-- Heroicon name: solid/chevron-left -->
|
|
37
|
+
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
38
|
+
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
|
39
|
+
</svg>
|
|
40
|
+
</div>
|
|
41
|
+
<div
|
|
42
|
+
v-for="page in pageRange"
|
|
43
|
+
:key="page"
|
|
44
|
+
:class="[
|
|
45
|
+
page == currentPageNumber
|
|
46
|
+
? 'z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium'
|
|
47
|
+
: '',
|
|
48
|
+
page === '...' ? 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border border-r-0 text-sm font-medium' : '',
|
|
49
|
+
page !== currentPageNumber && page !== '...'
|
|
50
|
+
? 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border border-r-0 text-sm font-medium'
|
|
51
|
+
: '',
|
|
52
|
+
]"
|
|
53
|
+
@click="changePage(page)"
|
|
54
|
+
>
|
|
55
|
+
<div v-if="page === '...'">...</div>
|
|
56
|
+
<div v-else>
|
|
57
|
+
{{ page }}
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div href="#"
|
|
61
|
+
class="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 hover:bg-gray-50"
|
|
62
|
+
@click="currentPageNumber == lastPageNumber ? '' : goToNextPage()"
|
|
63
|
+
:class="
|
|
64
|
+
currentPageNumber == lastPageNumber
|
|
65
|
+
? 'text-gray-400 pointer-events-none'
|
|
66
|
+
: 'text-gray-500 hover:text-gray-700 group cursor-pointer'
|
|
67
|
+
"
|
|
68
|
+
>
|
|
69
|
+
<span class="sr-only">Next</span>
|
|
70
|
+
<!-- Heroicon name: solid/chevron-right -->
|
|
71
|
+
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
72
|
+
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
|
73
|
+
</svg>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</nav>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
75
80
|
</template>
|
|
76
81
|
<script>
|
|
77
|
-
import CIcon from "../CIcon/CIcon.vue";
|
|
78
82
|
export default {
|
|
79
83
|
name: "CPagination",
|
|
80
84
|
props: {
|
|
@@ -92,7 +96,7 @@ export default {
|
|
|
92
96
|
},
|
|
93
97
|
},
|
|
94
98
|
components: {
|
|
95
|
-
|
|
99
|
+
|
|
96
100
|
},
|
|
97
101
|
data() {
|
|
98
102
|
return {
|
|
@@ -148,4 +152,4 @@ export default {
|
|
|
148
152
|
},
|
|
149
153
|
},
|
|
150
154
|
};
|
|
151
|
-
</script>
|
|
155
|
+
</script>
|