You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.2 KiB

  1. <template>
  2. <v-bottom-navigation
  3. app
  4. absolute
  5. hide-on-scroll
  6. >
  7. <v-btn
  8. :disabled="value===1"
  9. @click="prevPage"
  10. >
  11. <span>Prev</span>
  12. <v-icon>mdi-chevron-left</v-icon>
  13. </v-btn>
  14. <!-- <v-btn @click="approveDocument">
  15. <span>Done</span>
  16. <v-icon v-if="approved">
  17. mdi-check
  18. </v-icon>
  19. <v-icon v-else>
  20. mdi-close
  21. </v-icon>
  22. </v-btn>
  23. <v-btn value="guide">
  24. <span>Guideline</span>
  25. <v-icon>mdi-book-open-outline</v-icon>
  26. </v-btn> -->
  27. <v-btn
  28. :disabled="value===length || length===0"
  29. @click="nextPage"
  30. >
  31. <span>Next</span>
  32. <v-icon>mdi-chevron-right</v-icon>
  33. </v-btn>
  34. </v-bottom-navigation>
  35. </template>
  36. <script>
  37. export default {
  38. props: {
  39. value: {
  40. type: Number,
  41. default: 1,
  42. required: true
  43. },
  44. length: {
  45. type: Number,
  46. default: 1,
  47. required: true
  48. }
  49. },
  50. methods: {
  51. prevPage() {
  52. const page = Math.max(this.value - 1, 1)
  53. this.$emit('input', page)
  54. },
  55. nextPage() {
  56. const page = Math.min(this.value + 1, this.length)
  57. this.$emit('input', page)
  58. }
  59. }
  60. }
  61. </script>