Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 1 | const BVPaginationMixin = { |
| 2 | data() { |
| 3 | return { |
| 4 | currentPage: 1, |
| 5 | perPage: 20, |
| 6 | itemsPerPageOptions: [ |
| 7 | { |
| 8 | value: 10, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 9 | text: '10', |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 10 | }, |
| 11 | { |
| 12 | value: 20, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 13 | text: '20', |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 14 | }, |
| 15 | { |
| 16 | value: 30, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 17 | text: '30', |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 18 | }, |
| 19 | { |
| 20 | value: 40, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 21 | text: '40', |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 22 | }, |
| 23 | { |
| 24 | value: 0, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 25 | text: this.$t('global.table.viewAll'), |
| 26 | }, |
| 27 | ], |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 28 | }; |
| 29 | }, |
| 30 | methods: { |
| 31 | getTotalRowCount(count) { |
| 32 | return this.perPage === 0 ? 0 : count; |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 33 | }, |
| 34 | }, |
Yoshie Muranaka | f9832b0 | 2020-05-12 12:04:46 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | export default BVPaginationMixin; |