Commit 4134d8ad authored by zhengke's avatar zhengke

删除多余代码

parent a8f3ff96
......@@ -118,7 +118,6 @@ import UploadService from '@/services/UploadService'
import { domainManager } from '@/utils/domainManager'
import { ToolbarStates } from '@/types/toolbar'
import useEditor from '@/utils/Editor/index'
import useExport from '@/hooks/useExport'
import HotkeyDoc from './HotkeyDoc.vue'
......@@ -167,12 +166,9 @@ const CoverImgStore = useScreenStore()
const dataLoadingStore = useScreenStore()
const TempIdStore = useScreenStore()
const ConfigIdStore = useScreenStore()
const FeatureImgRef = ref(null)
const { exportFeatureImg } = useExport()
const psdVisibleStatus = ref(false)
const { market, model, ConfigId, CoverImg, dataLoading, TempId, FeatureImg, SourceLoading } = storeToRefs(useScreenStore())
const { market, model, ConfigId, CoverImg, dataLoading, TempId, SourceLoading } = storeToRefs(useScreenStore())
// 返回到首页
const goBack = () =>{
......
......@@ -13,7 +13,7 @@
</div>
<div class="configs">
<div class="row">
<div class="title">{{isCoverImg?'生成格式:':'导出格式:'}}</div>
<div class="title">导出格式:</div>
<RadioGroup
class="config-item"
v-model:value="format"
......@@ -23,7 +23,7 @@
</RadioGroup>
</div>
<div class="row">
<div class="title">{{isCoverImg?'生成范围:':'导出范围:'}}</div>
<div class="title">导出范围:</div>
<RadioGroup
class="config-item"
v-model:value="rangeType"
......@@ -66,11 +66,11 @@
<div class="btns">
<Button class="btn export" type="primary" @click="expImage()">
{{isCoverImg?'生成封面':'导出图片'}}</Button>
导出图片</Button>
<Button class="btn close" @click="emit('close')">关闭</Button>
</div>
<FullscreenSpin :loading="exporting" :tip="isCoverImg?'正在生成...':'正在导出...'" />
<FullscreenSpin :loading="exporting" tip="正在导出..." />
</div>
</template>
......@@ -93,7 +93,6 @@ const emit = defineEmits<{
}>()
const { slides, currentSlide } = storeToRefs(useSlidesStore())
const { isCoverImg } = storeToRefs(useScreenStore())
const imageThumbnailsRef = ref<HTMLElement>()
......
......@@ -7,7 +7,7 @@
@update:value="key => setDialogForExport(key as DialogForExportTypes)"
/>
<div class="content">
<component :is="currentDialogComponent" @close="setDialogForExport(''),setDialogIsCoverImg()"></component>
<component :is="currentDialogComponent" @close="setDialogForExport('')"></component>
</div>
</div>
</template>
......@@ -15,7 +15,7 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { storeToRefs } from 'pinia'
import { useMainStore, useScreenStore } from '@/store'
import { useMainStore } from '@/store'
import type { DialogForExportTypes } from '@/types/export'
import ExportImage from './ExportImage.vue'
......@@ -30,17 +30,11 @@ interface TabItem {
label: string
}
const isCoverImgStore = useScreenStore()
const mainStore = useMainStore()
const { dialogForExport } = storeToRefs(mainStore)
const { isCoverImg } = storeToRefs(isCoverImgStore)
const setDialogForExport = mainStore.setDialogForExport
const setDialogIsCoverImg = () => {
isCoverImgStore.setIsCoverImg(false)
}
const tabs: TabItem[] = [
{ key: 'pptist', label: '导出 pptist 文件' },
{ key: 'pptx', label: '导出 PPTX' },
......@@ -57,8 +51,8 @@ const currentDialogComponent = computed<unknown>(() => {
'pptx': ExportPPTX,
'pptist': ExportSpecificFile,
}
if (dialogForExport.value) return dialogMap[dialogForExport.value] || isCoverImgStore.setIsCoverImg(false)
return isCoverImgStore.setIsCoverImg(false)
if (dialogForExport.value) return dialogMap[dialogForExport.value] || null
return null
})
</script>
......
......@@ -129,7 +129,7 @@
<!-- 生成封面图 -->
<div style="opacity: 0;position: fixed;left: 100px;top: 0;overflow: auto;z-index: -1;"
v-if="model&&model==1&&slides.length>0&&slideIndex>=0">
v-if="model&&model==1&&slides.length>0&&slideIndex>=0&&slides[slideIndex].id">
<div class="export-img-dialog">
<div class="thumbnails-view">
<div class="thumbnails FeatureImgRef" ref="FeatureImgRef">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment