【优化】生成内容按钮增加 二次确认

This commit is contained in:
cherishsince 2024-06-18 11:28:01 +08:00
parent 27d7fe48c6
commit 990093c0cb
2 changed files with 10 additions and 3 deletions

View File

@ -121,6 +121,8 @@ const drawIn = ref<boolean>(false) // 生成中
const selectHotWord = ref<string>('') //
const hotWords = ref<string[]>(['中国旗袍', '古装美女', '卡通头像', '机甲战士', '童话小屋', '中国长城']) //
const selectModel = ref<any>({}) //
// message
const message = useMessage()
// TODO @fanimage
// TODO @fan image
const models = ref<ImageModelVO[]>([
@ -228,6 +230,8 @@ const handlerSizeClick = async (imageSize: ImageSizeVO) => {
/** 图片生产 */
const handlerGenerateImage = async () => {
//
await message.confirm(`确认生成内容?`)
try {
//
drawIn.value = true

View File

@ -97,7 +97,8 @@
// image
import {ImageApi, ImageMidjourneyImagineReqVO} from "@/api/ai/image";
// message
const message = useMessage()
// emits
const emits = defineEmits(['onDrawStart', 'onDrawComplete'])
@ -196,8 +197,8 @@ const midjourneyVersionList = ref<any>([
])
const nijiVersionList = ref<any>([
{
value: '5.0',
label: 'v5.0',
value: '5',
label: 'v5',
},
])
const selectVersion = ref<any>('6.0') // version
@ -246,6 +247,8 @@ const handlerChangeVersion = async (version) => {
/** 图片生产 */
const handlerGenerateImage = async () => {
//
await message.confirm(`确认生成内容?`)
// todo @
try {
//