ContentsPage.vue 1001 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <Window width="600px" ref="window" @close="close">
  3. <template slot="header">
  4. </template>
  5. </Window>
  6. </template>
  7. <script>
  8. //-----------------------------------------------------------------------------
  9. import Vue from 'vue';
  10. import Component from 'vue-class-component';
  11. //import _ from 'lodash';
  12. import Window from '../../share/Window.vue';
  13. //import * as utils from '../../../share/utils';
  14. export default @Component({
  15. components: {
  16. Window,
  17. },
  18. watch: {
  19. },
  20. })
  21. class ContentsPage extends Vue {
  22. created() {
  23. }
  24. init() {
  25. this.$refs.window.init();
  26. }
  27. close() {
  28. this.$emit('do-action', {action: 'contents'});
  29. }
  30. keyHook(event) {
  31. if (!this.$root.stdDialog.active && event.type == 'keydown' && event.key == 'Escape') {
  32. this.close();
  33. }
  34. return true;
  35. }
  36. }
  37. //-----------------------------------------------------------------------------
  38. </script>
  39. <style scoped>
  40. </style>