|
50 | 50 | <p>
|
51 | 51 | <span>Showing </span>
|
52 | 52 | <span class="has-text-weight-bold">
|
53 |
| - {{ (pagination.currentPage * numberPerPage) + 1 }} - {{ (pagination.currentPage * numberPerPage) + numberPerPage }} |
| 53 | + {{ ((pagination.currentPage * numberPerPage) - numberPerPage) + 1 }} - {{ ((pagination.currentPage * numberPerPage) - numberPerPage) + numberPerPage }} |
54 | 54 | </span>
|
55 | 55 | <span> of </span>
|
56 | 56 | <span class="has-text-weight-bold">
|
|
127 | 127 | </thead>
|
128 | 128 | <tbody>
|
129 | 129 | <tr class="cve-search-result" v-if="Object.keys(useCveListSearchStore.recordData).length > 0">
|
130 |
| - <td data-label="CVE ID" class="is-hidden-touch">{{ useCveListSearchStore.recordData.cveId }}</td> |
131 |
| - <td data-label="CNA" class="is-hidden-touch">{{ useCveListSearchStore.recordData.cna }}</td> |
| 130 | + <td data-label="CVE ID" style="width: 20%">{{ useCveListSearchStore.recordData.cveId }}</td> |
| 131 | + <td data-label="CNA" style="width: 20%">{{ useCveListSearchStore.recordData.cna }}</td> |
132 | 132 | <td data-label="Description">
|
133 | 133 | <p v-for="description in useCveListSearchStore.recordData.descriptions" :key="description.key">{{ description }}</p>
|
134 | 134 | </td>
|
|
163 | 163 | name: 'SearchResults',
|
164 | 164 | data() {
|
165 | 165 | return {
|
166 |
| - isMessageExpanded: false, |
167 | 166 | useCveListSearchStore: useCveListSearchStore(),
|
168 | 167 | numberPerPage: 25,
|
169 | 168 | sortBy: {
|
|
182 | 181 | },
|
183 | 182 | beforeMount(){
|
184 | 183 | this.setupPagination();
|
185 |
| - console.log(this.pagination.totalPages) |
186 | 184 | },
|
187 | 185 | watch: {
|
188 | 186 | numberPerPage() {
|
|
203 | 201 | if (this.pagination?.startWindow && this.pagination?.endWindow) {
|
204 | 202 | this.pagination.currentPageWindow = this.calcRange(this.pagination.startWindow, this.pagination.endWindow, 1);
|
205 | 203 | }
|
| 204 | +
|
| 205 | + console.log('pagination ', this.pagination) |
206 | 206 | },
|
207 | 207 | setupResultsPage() {
|
208 | 208 | // search service count starts at 0
|
|
225 | 225 | this.pagination.currentPageWindow = this.calcRange(this.pagination.startWindow, this.pagination.endWindow, 1);
|
226 | 226 | }
|
227 | 227 | console.log(this.pagination.currentPage, this.pagination.startWindow, this.pagination.endWindow, )
|
| 228 | + console.log('pagination ', this.pagination) |
228 | 229 | this.paginate();
|
229 | 230 | },
|
230 | 231 | getPreviousPage() {
|
|
241 | 242 |
|
242 | 243 | this.pagination.currentPageWindow = this.calcRange(this.pagination.startWindow, this.pagination.endWindow, 1);
|
243 | 244 | }
|
| 245 | + console.log('pagination ', this.pagination) |
244 | 246 | this.paginate();
|
245 | 247 | },
|
246 | 248 | paginate() {
|
|
0 commit comments