mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 12:13:46 +08:00
feat: midjourney image variation function is ready
This commit is contained in:
@@ -92,14 +92,23 @@ watch(() => props.content, (newVal) => {
|
||||
});
|
||||
const emits = defineEmits(['disable-input', 'disable-input']);
|
||||
const upscale = (index) => {
|
||||
send('/api/mj/upscale', index)
|
||||
}
|
||||
|
||||
const variation = (index) => {
|
||||
send('/api/mj/variation', index)
|
||||
}
|
||||
|
||||
const send = (url, index) => {
|
||||
loading.value = true
|
||||
emits('disable-input')
|
||||
httpPost("/api/mj/upscale", {
|
||||
httpPost(url, {
|
||||
index: index,
|
||||
message_id: data.value?.["message_id"],
|
||||
message_hash: data.value?.["image"]?.hash,
|
||||
session_id: getSessionId(),
|
||||
key: data.value?.["key"]
|
||||
key: data.value?.["key"],
|
||||
prompt: data.value?.["prompt"],
|
||||
}).then(() => {
|
||||
ElMessage.success("任务推送成功,请耐心等待任务执行...")
|
||||
loading.value = false
|
||||
@@ -108,10 +117,6 @@ const upscale = (index) => {
|
||||
emits('disable-input')
|
||||
})
|
||||
}
|
||||
|
||||
const variation = (index) => {
|
||||
ElMessage.warning("当前版本暂未实现 Variation 功能!")
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
Reference in New Issue
Block a user