File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
frontend/components/containers/annotation Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 4
4
{{ page }} of {{ total }}
5
5
</span >
6
6
<v-btn
7
+ v-shortkey.once =" ['arrowleft']"
7
8
text
8
9
:disabled =" page===1"
9
10
fab
10
11
small
12
+ @shortkey =" prevPage"
11
13
@click =" prevPage"
12
14
>
13
15
<v-icon >mdi-chevron-left</v-icon >
14
16
</v-btn >
15
17
<v-btn
18
+ v-shortkey.once =" ['arrowright']"
16
19
text
17
20
:disabled =" page===total"
18
21
fab
19
22
small
23
+ @shortkey =" nextPage"
20
24
@click =" nextPage"
21
25
>
22
26
<v-icon >mdi-chevron-right</v-icon >
25
29
</template >
26
30
27
31
<script >
32
+ import Vue from ' vue'
28
33
import { mapState , mapActions , mapMutations } from ' vuex'
34
+ Vue .use (require (' vue-shortkey' ))
29
35
30
36
export default {
31
37
data () {
@@ -79,10 +85,10 @@ export default {
79
85
... mapActions (' documents' , [' getDocumentList' ]),
80
86
... mapMutations (' documents' , [' setCurrent' , ' updateSearchOptions' ]),
81
87
prevPage () {
82
- this .page -= 1
88
+ this .page = Math . max ( this . page - 1 , 1 )
83
89
},
84
90
nextPage () {
85
- this .page += 1
91
+ this .page = Math . min ( this . page + 1 , this . total )
86
92
}
87
93
}
88
94
}
You can’t perform that action at this time.
0 commit comments