reader-footer.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="footer" v-if="show">
  3. <view class="footer-item" @tap="onCatalog">
  4. <text class="iconfont icon-mulu"></text>
  5. <text>目录</text>
  6. </view>
  7. <view class="footer-item" @tap="onNotes">
  8. <text class="iconfont icon-liuyan"></text>
  9. <text>记录</text>
  10. </view>
  11. <view class="footer-item" @tap="onProgress">
  12. <text class="iconfont icon-schedule"></text>
  13. <text>进度</text>
  14. </view>
  15. <view class="footer-item" @tap="onSettings">
  16. <text class="iconfont icon-Aa"></text>
  17. <text>设置</text>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'ReaderFooter',
  24. props: {
  25. show: {
  26. type: Boolean,
  27. default: false
  28. }
  29. },
  30. methods: {
  31. onCatalog() {
  32. this.$emit('show-catalog')
  33. },
  34. onNotes() {
  35. this.$emit('show-notes')
  36. },
  37. onProgress() {
  38. this.$emit('show-progress')
  39. },
  40. onSettings() {
  41. this.$emit('show-settings')
  42. }
  43. }
  44. }
  45. </script>
  46. <style scoped>
  47. .footer {
  48. position: fixed;
  49. bottom: 0;
  50. left: 0;
  51. right: 0;
  52. height: 100rpx;
  53. display: flex;
  54. justify-content: space-around;
  55. align-items: center;
  56. background-color: #ffffff;
  57. z-index: 100;
  58. }
  59. .footer-item {
  60. display: flex;
  61. flex-direction: column;
  62. align-items: center;
  63. color: #000000;
  64. font-size: 24rpx;
  65. }
  66. .icon {
  67. font-family: "iconfont";
  68. font-size: 40rpx;
  69. }
  70. </style>