TextPage.vue 937 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <div class="main">
  3. <pre>{{ lastOpenedBook }}</pre>
  4. <pre>{{this.$store.state.reader.openedBook}}</pre>
  5. </div>
  6. </template>
  7. <script>
  8. //-----------------------------------------------------------------------------
  9. import Vue from 'vue';
  10. import Component from 'vue-class-component';
  11. import bookManager from '../share/bookManager';
  12. export default @Component({
  13. })
  14. class TextPage extends Vue {
  15. created() {
  16. this.commit = this.$store.commit;
  17. this.dispatch = this.$store.dispatch;
  18. this.config = this.$store.state.config;
  19. this.reader = this.$store.state.reader;
  20. }
  21. get lastOpenedBook() {
  22. return this.$store.getters['reader/lastOpenedBook'];
  23. }
  24. keyHook(event) {
  25. }
  26. }
  27. //-----------------------------------------------------------------------------
  28. </script>
  29. <style scoped>
  30. .main {
  31. flex: 1;
  32. display: flex;
  33. flex-direction: column;
  34. }
  35. </style>