ExportPPTX.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div class="export-pptx-dialog">
  3. <div class="btns">
  4. <Button class="btn export" type="primary" @click="exportPPTX()">导出 PPTX</Button>
  5. <Button class="btn close" @click="emit('close')">关闭</Button>
  6. </div>
  7. <FullscreenSpin :loading="exporting" tip="正在导出..." />
  8. </div>
  9. </template>
  10. <script lang="ts" setup>
  11. import useExport from "@/hooks/useExport"
  12. import FullscreenSpin from "@/components/FullscreenSpin.vue"
  13. import Button from "@/components/Button.vue"
  14. const emit = defineEmits<{
  15. (event: "close"): void
  16. }>()
  17. const { exportPPTX, exporting } = useExport()
  18. </script>
  19. <style lang="scss" scoped>
  20. .export-pptx-dialog {
  21. height: 100%;
  22. display: flex;
  23. justify-content: center;
  24. align-items: center;
  25. flex-direction: column;
  26. position: relative;
  27. overflow: hidden;
  28. }
  29. .btns {
  30. width: 300px;
  31. height: 100px;
  32. display: flex;
  33. justify-content: center;
  34. align-items: center;
  35. .export {
  36. flex: 1;
  37. }
  38. .close {
  39. width: 100px;
  40. margin-left: 10px;
  41. }
  42. }
  43. </style>