|
3 | 3 | class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6" |
4 | 4 | v-if="meta" |
5 | 5 | > |
6 | | - <p v-if="meta.total < 1">{{ translations.no_results_found }}</p> |
7 | | - <div v-if="meta.total > 0" class="flex-1 flex justify-between sm:hidden"> |
| 6 | + <p v-if="pagination.total < 1">{{ translations.no_results_found }}</p> |
| 7 | + <div v-if="pagination.total > 0" class="flex-1 flex justify-between sm:hidden"> |
8 | 8 | <component |
9 | | - :is="meta.prev_page_url ? 'inertia-link' : 'div'" |
10 | | - :href="meta.prev_page_url" |
| 9 | + :is="previousPageUrl ? 'inertia-link' : 'div'" |
| 10 | + :href="previousPageUrl" |
11 | 11 | 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:text-gray-500" |
12 | 12 | >{{ translations.previous }}</component> |
13 | 13 | <component |
14 | | - :is="meta.next_page_url ? 'inertia-link' : 'div'" |
15 | | - :href="meta.next_page_url" |
| 14 | + :is="nextPageUrl ? 'inertia-link' : 'div'" |
| 15 | + :href="nextPageUrl" |
16 | 16 | 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:text-gray-500" |
17 | 17 | >{{ translations.next }}</component> |
18 | 18 | </div> |
19 | | - <div v-if="meta.total > 0" class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"> |
| 19 | + <div |
| 20 | + v-if="pagination.total > 0" |
| 21 | + class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between" |
| 22 | + > |
20 | 23 | <div> |
21 | 24 | <p class="hidden lg:block text-sm text-gray-700"> |
22 | | - <span class="font-medium">{{ meta.from }}</span> |
| 25 | + <span class="font-medium">{{ pagination.from }}</span> |
23 | 26 | {{ translations.to }} |
24 | | - <span class="font-medium">{{ meta.to }}</span> |
| 27 | + <span class="font-medium">{{ pagination.to }}</span> |
25 | 28 | {{ translations.of }} |
26 | | - <span class="font-medium">{{ meta.total }}</span> |
| 29 | + <span class="font-medium">{{ pagination.total }}</span> |
27 | 30 | {{ translations.results }} |
28 | 31 | </p> |
29 | 32 | </div> |
|
33 | 36 | aria-label="Pagination" |
34 | 37 | > |
35 | 38 | <component |
36 | | - :is="meta.prev_page_url ? 'inertia-link' : 'div'" |
37 | | - :href="meta.prev_page_url" |
| 39 | + :is="previousPageUrl ? 'inertia-link' : 'div'" |
| 40 | + :href="previousPageUrl" |
38 | 41 | class="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 hover:bg-gray-50" |
39 | 42 | > |
40 | 43 | <span class="sr-only">{{ translations.previous }}</span> |
|
52 | 55 | </svg> |
53 | 56 | </component> |
54 | 57 |
|
55 | | - <div v-for="(link, key) in meta.links" :key="key"> |
| 58 | + <div v-for="(link, key) in pagination.links" :key="key"> |
56 | 59 | <slot name="link"> |
57 | 60 | <component |
58 | 61 | v-if="!isNaN(link.label) || link.label === '...'" |
|
65 | 68 | </div> |
66 | 69 |
|
67 | 70 | <component |
68 | | - :is="meta.next_page_url ? 'inertia-link' : 'div'" |
69 | | - :href="meta.next_page_url" |
| 71 | + :is="nextPageUrl ? 'inertia-link' : 'div'" |
| 72 | + :href="nextPageUrl" |
70 | 73 | 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" |
71 | 74 | > |
72 | 75 | <span class="sr-only">{{ translations.next }}</span> |
|
0 commit comments