File size: 2,683 Bytes
89ce340 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
<template>
<div class="pptist-editor">
<EditorHeader class="layout-header" />
<div class="layout-content">
<Thumbnails class="layout-content-left" />
<div class="layout-content-center">
<CanvasTool class="center-top" />
<Canvas class="center-body" :style="{ height: `calc(100% - ${remarkHeight + 40}px)` }" />
<Remark
class="center-bottom"
v-model:height="remarkHeight"
:style="{ height: `${remarkHeight}px` }"
/>
</div>
<Toolbar class="layout-content-right" />
</div>
</div>
<SelectPanel v-if="showSelectPanel" />
<SearchPanel v-if="showSearchPanel" />
<NotesPanel v-if="showNotesPanel" />
<MarkupPanel v-if="showMarkupPanel" />
<Modal
:visible="!!dialogForExport"
:width="680"
@closed="closeExportDialog()"
>
<ExportDialog />
</Modal>
<Modal
:visible="showAIPPTDialog"
:width="680"
:closeOnClickMask="false"
:closeOnEsc="false"
closeButton
@closed="closeAIPPTDialog()"
>
<AIPPTDialog />
</Modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import { useMainStore } from '@/store'
import useGlobalHotkey from '@/hooks/useGlobalHotkey'
import usePasteEvent from '@/hooks/usePasteEvent'
import EditorHeader from './EditorHeader/index.vue'
import Canvas from './Canvas/index.vue'
import CanvasTool from './CanvasTool/index.vue'
import Thumbnails from './Thumbnails/index.vue'
import Toolbar from './Toolbar/index.vue'
import Remark from './Remark/index.vue'
import ExportDialog from './ExportDialog/index.vue'
import SelectPanel from './SelectPanel.vue'
import SearchPanel from './SearchPanel.vue'
import NotesPanel from './NotesPanel.vue'
import MarkupPanel from './MarkupPanel.vue'
import AIPPTDialog from './AIPPTDialog.vue'
import Modal from '@/components/Modal.vue'
const mainStore = useMainStore()
const { dialogForExport, showSelectPanel, showSearchPanel, showNotesPanel, showMarkupPanel, showAIPPTDialog } = storeToRefs(mainStore)
const closeExportDialog = () => mainStore.setDialogForExport('')
const closeAIPPTDialog = () => mainStore.setAIPPTDialogState(false)
const remarkHeight = ref(40)
useGlobalHotkey()
usePasteEvent()
</script>
<style lang="scss" scoped>
.pptist-editor {
height: 100%;
}
.layout-header {
height: 40px;
}
.layout-content {
height: calc(100% - 40px);
display: flex;
}
.layout-content-left {
width: 160px;
height: 100%;
flex-shrink: 0;
}
.layout-content-center {
width: calc(100% - 160px - 260px);
.center-top {
height: 40px;
}
}
.layout-content-right {
width: 260px;
height: 100%;
}
</style> |