【优化】调整 ai Image 方法注释

This commit is contained in:
cherishsince 2024-06-03 10:16:56 +08:00
parent 9bd8d8e9cb
commit 8e821445c2
6 changed files with 20 additions and 60 deletions

View File

@ -85,24 +85,18 @@ const props = defineProps({
}
})
/**
* 抽屉 - close
*/
/** 抽屉 - close */
const handlerDrawerClose = async () => {
emits('handlerDrawerClose')
}
/**
* 获取 - 图片 detail
*/
/** 获取 - 图片 detail */
const getImageDetail = async (id) => {
//
imageDetail.value = await ImageApi.getImageDetail(id)
}
/**
* 任务 - detail
*/
/** 任务 - detail */
const handlerTaskDetail = async () => {
showDrawer.value = true
}

View File

@ -28,16 +28,12 @@ const showImageDetailId = ref<number>(0) // 是否显示 task 详情
// TODO @fan /** */~
/**
* 抽屉 - close
*/
/** 抽屉 - close */
const handlerDrawerClose = async () => {
isShowImageDetail.value = false
}
/**
* 任务 - detail
*/
/** 任务 - detail */
const handlerDrawerOpen = async () => {
isShowImageDetail.value = true
}
@ -50,9 +46,7 @@ const getImageList = async () => {
imageList.value = list
}
/**
* 图片 - btn click
*/
/** 图片 - btn click */
const handlerImageBtnClick = async (type, imageDetail: ImageDetailVO) => {
// image detail id
showImageDetailId.value = imageDetail.id
@ -69,9 +63,7 @@ const handlerImageBtnClick = async (type, imageDetail: ImageDetailVO) => {
}
}
/**
* 下载 - image
*/
/** 下载 - image */
// TODO @fan download
const downloadImage = async (imageUrl) => {
const image = new Image()

View File

@ -37,9 +37,7 @@ const props = defineProps({
}
})
/**
* 按钮 - 点击事件
*/
/** 按钮 - 点击事件 */
const handlerBtnClick = async (type, imageDetail: ImageDetailVO) => {
emits('onBtnClick', type, imageDetail)
}

View File

@ -186,9 +186,7 @@ const emits = defineEmits(['onDrawStart', 'onDrawComplete'])
// TODO @fan /** */~
// TODO @fanhandler handle
/**
* 热词 - click
*/
/** 热词 - click */
const handlerHotWordClick = async (hotWord: string) => {
//
if (selectHotWord.value == hotWord) {
@ -201,9 +199,7 @@ const handlerHotWordClick = async (hotWord: string) => {
prompt.value = hotWord
}
/**
* 模型 - click
*/
/** 模型 - click */
const handlerModelClick = async (model: ImageModelVO) => {
if (selectModel.value === model) {
selectModel.value = {} as ImageModelVO
@ -212,9 +208,7 @@ const handlerModelClick = async (model: ImageModelVO) => {
selectModel.value = model
}
/**
* 样式 - click
*/
/** 样式 - click */
const handlerStyleClick = async (imageStyle: ImageModelVO) => {
if (selectImageStyle.value === imageStyle) {
selectImageStyle.value = {} as ImageModelVO
@ -223,9 +217,7 @@ const handlerStyleClick = async (imageStyle: ImageModelVO) => {
selectImageStyle.value = imageStyle
}
/**
* size - click
*/
/** size - click */
const handlerSizeClick = async (imageSize: ImageSizeVO) => {
if (selectImageSize.value === imageSize) {
selectImageSize.value = {} as ImageSizeVO
@ -234,9 +226,7 @@ const handlerSizeClick = async (imageSize: ImageSizeVO) => {
selectImageSize.value = imageSize
}
/**
* 图片生产
*/
/** 图片生产 */
const handlerGenerateImage = async () => {
try {
//

View File

@ -33,17 +33,13 @@ const selectModel = ref('DALL3绘画')
const modelOptions = ['DALL3绘画', 'MJ绘画']
const drawIn = ref<boolean>(false) //
/**
* 绘画 - start
*/
/** 绘画 - start */
const handlerDrawStart = async (type) => {
// todo
drawIn.value = true
}
/**
* 绘画 - complete
*/
/** 绘画 - complete */
const handlerDrawComplete = async (type) => {
drawIn.value = false
// todo

View File

@ -198,9 +198,7 @@ const selectVersion = ref<any>('6.0') // 选中的 version
// Props
const props = defineProps({})
/**
* 热词 - click
*/
/** 热词 - click */
const handlerHotWordClick = async (hotWord: string) => {
//
if (selectHotWord.value == hotWord) {
@ -213,9 +211,7 @@ const handlerHotWordClick = async (hotWord: string) => {
prompt.value = hotWord
}
/**
* size - click
*/
/** size - click */
const handlerSizeClick = async (imageSize: ImageSizeVO) => {
if (selectImageSize.value === imageSize) {
selectImageSize.value = {} as ImageSizeVO
@ -224,23 +220,17 @@ const handlerSizeClick = async (imageSize: ImageSizeVO) => {
selectImageSize.value = imageSize
}
/**
* 模型 - click
*/
/** 模型 - click */
const handlerModelClick = async (model: ImageModelVO) => {
selectModel.value = model
}
/**
* version - click
*/
/** version - click */
const handlerChangeVersion = async (version) => {
console.log('version', version)
}
/**
* 图片生产
*/
/** 图片生产 */
const handlerGenerateImage = async () => {
// todo @
try {