mirror of
https://github.com/Fabio286/antares.git
synced 2025-03-06 12:27:50 +01:00
feat: key shortcuts to change DATA tab page
This commit is contained in:
parent
e71c7568c0
commit
f61d7eeaf4
@ -36,6 +36,7 @@
|
|||||||
<button
|
<button
|
||||||
class="btn btn-dark btn-sm mr-0"
|
class="btn btn-dark btn-sm mr-0"
|
||||||
:disabled="isQuering || page === 1"
|
:disabled="isQuering || page === 1"
|
||||||
|
title="CTRL+ᐊ"
|
||||||
@click="pageChange('prev')"
|
@click="pageChange('prev')"
|
||||||
>
|
>
|
||||||
<i class="mdi mdi-24px mdi-skip-previous" />
|
<i class="mdi mdi-24px mdi-skip-previous" />
|
||||||
@ -46,6 +47,7 @@
|
|||||||
<button
|
<button
|
||||||
class="btn btn-dark btn-sm mr-0"
|
class="btn btn-dark btn-sm mr-0"
|
||||||
:disabled="isQuering || (results.length && results[0].rows.length < limit)"
|
:disabled="isQuering || (results.length && results[0].rows.length < limit)"
|
||||||
|
title="CTRL+ᐅ"
|
||||||
@click="pageChange('next')"
|
@click="pageChange('next')"
|
||||||
>
|
>
|
||||||
<i class="mdi mdi-24px mdi-skip-next" />
|
<i class="mdi mdi-24px mdi-skip-next" />
|
||||||
@ -284,9 +286,11 @@ export default {
|
|||||||
this.getTableData(sortParams);
|
this.getTableData(sortParams);
|
||||||
},
|
},
|
||||||
pageChange (direction) {
|
pageChange (direction) {
|
||||||
if (direction === 'next')
|
if (this.isQuering) return;
|
||||||
|
|
||||||
|
if (direction === 'next' && (this.results.length && this.results[0].rows.length === this.limit))
|
||||||
this.page++;
|
this.page++;
|
||||||
else if (this.page > 1)
|
else if (direction === 'prev' && this.page > 1)
|
||||||
this.page--;
|
this.page--;
|
||||||
},
|
},
|
||||||
showAddModal () {
|
showAddModal () {
|
||||||
@ -307,6 +311,13 @@ export default {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (e.key === 'F5')
|
if (e.key === 'F5')
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
|
|
||||||
|
if (e.ctrlKey) {
|
||||||
|
if (e.key === 'ArrowRight')
|
||||||
|
this.pageChange('next');
|
||||||
|
if (e.key === 'ArrowLeft')
|
||||||
|
this.pageChange('prev');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setRefreshInterval () {
|
setRefreshInterval () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user