【修改todo】Loading组件 改为 @芋艿

pull/471/head^2
cherishsince 2024-07-05 09:39:14 +08:00
parent fda50ff291
commit 5fd8177791
1 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@
import {Delete, Download, More, RefreshRight} from '@element-plus/icons-vue' import {Delete, Download, More, RefreshRight} from '@element-plus/icons-vue'
import { ImageVO, ImageMjButtonsVO } from '@/api/ai/image' import { ImageVO, ImageMjButtonsVO } from '@/api/ai/image'
import { PropType } from 'vue' import { PropType } from 'vue'
import { ElLoading } from 'element-plus' import {ElLoading, LoadingOptionsResolved} from 'element-plus'
import { AiImageStatusEnum } from '@/views/ai/utils/constants' import { AiImageStatusEnum } from '@/views/ai/utils/constants'
const cardImageRef = ref<any>() // image ref const cardImageRef = ref<any>() // image ref
@ -83,12 +83,12 @@ const handleBtnClick = async (type, imageDetail: ImageVO) => {
} }
const handleLoading = async (status: number) => { const handleLoading = async (status: number) => {
// TODO @fan Loading // TODO @ Loading
if (status === AiImageStatusEnum.IN_PROGRESS) { if (status === AiImageStatusEnum.IN_PROGRESS) {
cardImageLoadingInstance.value = ElLoading.service({ cardImageLoadingInstance.value = ElLoading.service({
target: cardImageRef.value, target: cardImageRef.value,
text: '生成中...' text: '生成中...'
}) } as LoadingOptionsResolved)
} else { } else {
if (cardImageLoadingInstance.value) { if (cardImageLoadingInstance.value) {
cardImageLoadingInstance.value.close() cardImageLoadingInstance.value.close()