SettingsPage.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div ref="main" class="main" @click="close">
  3. <div class="mainWindow" @click.stop>
  4. <Window @close="close">
  5. <template slot="header">
  6. Настройки
  7. </template>
  8. </Window>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. //-----------------------------------------------------------------------------
  14. import Vue from 'vue';
  15. import Component from 'vue-class-component';
  16. import Window from '../../share/Window.vue';
  17. export default @Component({
  18. components: {
  19. Window,
  20. },
  21. })
  22. class SettingsPage extends Vue {
  23. sliderValue = null;
  24. sliderMax = null;
  25. created() {
  26. this.commit = this.$store.commit;
  27. this.reader = this.$store.state.reader;
  28. }
  29. close() {
  30. this.$emit('settings-toggle');
  31. }
  32. keyHook(event) {
  33. if (event.type == 'keydown' && event.code == 'Escape') {
  34. this.close();
  35. }
  36. return true;
  37. }
  38. }
  39. //-----------------------------------------------------------------------------
  40. </script>
  41. <style scoped>
  42. .main {
  43. position: absolute;
  44. width: 100%;
  45. height: 100%;
  46. z-index: 60;
  47. display: flex;
  48. flex-direction: column;
  49. justify-content: center;
  50. align-items: center;
  51. }
  52. .mainWindow {
  53. width: 100%;
  54. max-width: 600px;
  55. height: 70%;
  56. display: flex;
  57. position: relative;
  58. }
  59. </style>