File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 23
23
</template >
24
24
25
25
<script >
26
- import {Language , AvailableLanguages } from ' ../utils'
27
26
export default {
28
27
name: ' TinyPagination' ,
29
28
props: {
@@ -52,17 +51,30 @@ export default {
52
51
data () {
53
52
return {
54
53
currentPage: 1 ,
55
- currentLimit: 10
54
+ currentLimit: 10 ,
55
+ translations: {
56
+ en: {
57
+ prev: ' Previous' ,
58
+ title: ' Page' ,
59
+ next: ' Next'
60
+ },
61
+ es: {
62
+ prev: ' Anterior' ,
63
+ title: ' Página' ,
64
+ next: ' Siguiente'
65
+ }
66
+ },
67
+ availableLanguages: [' en' , ' es' ]
56
68
}
57
69
},
58
70
created () {
59
71
this .currentPage = this .page
60
72
},
61
73
computed: {
62
74
translation () {
63
- return (AvailableLanguages .includes (this .lang )) ?
64
- Language .translations [this .lang ]
65
- : Language .translations [' en' ]
75
+ return (this . availableLanguages .includes (this .lang )) ?
76
+ this .translations [this .lang ]
77
+ : this .translations [' en' ]
66
78
},
67
79
totalPages () {
68
80
return Math .ceil (this .total / this .currentLimit )
You can’t perform that action at this time.
0 commit comments