@@ -218,7 +218,9 @@ export default defineComponent({
218
218
this .searchRepos ();
219
219
},
220
220
221
- changePage(page : number ) {
221
+ async changePage(page : number ) {
222
+ if (this .isLoading ) return ;
223
+
222
224
this .page = page ;
223
225
if (this .page > this .finalPage ) {
224
226
this .page = this .finalPage ;
@@ -228,7 +230,7 @@ export default defineComponent({
228
230
}
229
231
this .repos = [];
230
232
this .counts [` ${this .reposFilter }:${this .archivedFilter }:${this .privateFilter } ` ] = 0 ;
231
- this .searchRepos ();
233
+ await this .searchRepos ();
232
234
},
233
235
234
236
async searchRepos() {
@@ -298,7 +300,7 @@ export default defineComponent({
298
300
return commitStatus [status ].color ;
299
301
},
300
302
301
- reposFilterKeyControl(e : KeyboardEvent ) {
303
+ async reposFilterKeyControl(e : KeyboardEvent ) {
302
304
switch (e .key ) {
303
305
case ' Enter' :
304
306
document .querySelector <HTMLAnchorElement >(' .repo-owner-name-list li.active a' )?.click ();
@@ -307,7 +309,7 @@ export default defineComponent({
307
309
if (this .activeIndex > 0 ) {
308
310
this .activeIndex -- ;
309
311
} else if (this .page > 1 ) {
310
- this .changePage (this .page - 1 );
312
+ await this .changePage (this .page - 1 );
311
313
this .activeIndex = this .searchLimit - 1 ;
312
314
}
313
315
break ;
@@ -316,17 +318,17 @@ export default defineComponent({
316
318
this .activeIndex ++ ;
317
319
} else if (this .page < this .finalPage ) {
318
320
this .activeIndex = 0 ;
319
- this .changePage (this .page + 1 );
321
+ await this .changePage (this .page + 1 );
320
322
}
321
323
break ;
322
324
case ' ArrowRight' :
323
325
if (this .page < this .finalPage ) {
324
- this .changePage (this .page + 1 );
326
+ await this .changePage (this .page + 1 );
325
327
}
326
328
break ;
327
329
case ' ArrowLeft' :
328
330
if (this .page > 1 ) {
329
- this .changePage (this .page - 1 );
331
+ await this .changePage (this .page - 1 );
330
332
}
331
333
break ;
332
334
}
0 commit comments