Commit 8ed0d2c2 authored by zhengke's avatar zhengke

优化云盘

parent 360726f7
...@@ -158,7 +158,8 @@ const GroupList = ref([] as any) ...@@ -158,7 +158,8 @@ const GroupList = ref([] as any)
const setLoading = ref(false) const setLoading = ref(false)
const deleteLoading = ref<any>(null) const deleteLoading = ref<any>(null)
const props = defineProps({ const props = defineProps({
active: '' as any active: '' as any,
show: false as Boolean
}) })
const emit = defineEmits<{ const emit = defineEmits<{
...@@ -168,6 +169,9 @@ const emit = defineEmits<{ ...@@ -168,6 +169,9 @@ const emit = defineEmits<{
watch(() => props.active, () => { watch(() => props.active, () => {
if(props.active!=2) ImgId.value = '' if(props.active!=2) ImgId.value = ''
}) })
watch(() => props.show, () => {
if(!props.show) ImgId.value = ''
})
const setImg = (item:any) => { const setImg = (item:any) => {
ImgId.value = item.DetailsId ImgId.value = item.DetailsId
emit('getImg',item.FilePath) emit('getImg',item.FilePath)
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</div> </div>
</div> </div>
</FileInput> --> </FileInput> -->
<CloudDisk :active="activeName" @getImg="getImg"></CloudDisk> <CloudDisk :show="showVisible" :active="activeName" @getImg="getImg"></CloudDisk>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图片地址" name="3"> <el-tab-pane label="图片地址" name="3">
<div class="row wrap q-mt-md"> <div class="row wrap q-mt-md">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, inject } from 'vue' import { ref, reactive, inject, watch } from 'vue'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { type UploadProps, type UploadUserFile,type UploadInstance, ElMessage, ElLoading } from 'element-plus' import { type UploadProps, type UploadUserFile,type UploadInstance, ElMessage, ElLoading } from 'element-plus'
import useCreateElement from '@/hooks/useCreateElement' import useCreateElement from '@/hooks/useCreateElement'
...@@ -158,6 +158,11 @@ const slidesStore = useSlidesStore() ...@@ -158,6 +158,11 @@ const slidesStore = useSlidesStore()
const { slides, currentSlide, slideIndex, layoutSlides } = storeToRefs(slidesStore) const { slides, currentSlide, slideIndex, layoutSlides } = storeToRefs(slidesStore)
const { handleElement, handleElementId } = storeToRefs(mainStore) const { handleElement, handleElementId } = storeToRefs(mainStore)
const handleImageElement = handleElement as Ref<PPTImageElement> const handleImageElement = handleElement as Ref<PPTImageElement>
const { imgPoolVisible } = storeToRefs(useScreenStore())
watch(() => imgPoolVisible.value, () => {
if(imgPoolVisible.value) showVisible.value = true
})
const handleSizeChange = (val: number) => { const handleSizeChange = (val: number) => {
} }
...@@ -297,7 +302,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => { ...@@ -297,7 +302,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
} }
const close = () =>{ const close = () =>{
// showVisible.value = false showVisible.value = false
imgVisibleStore.setImgPoolVisible(false) imgVisibleStore.setImgPoolVisible(false)
imgVisibleStore.setImgReplaceVisible(false) imgVisibleStore.setImgReplaceVisible(false)
} }
......
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