add ref image
This commit is contained in:
1 parent
f32f133411
commit
e511dda451
2 files changed
+65
No files matched your search
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mb-4">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
class="upload-demo"
|
||||||
|
action="https://data.zhishuyun.com/api/v1/images/"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
list-type="picture"
|
||||||
|
:headers="headers"
|
||||||
|
>
|
||||||
|
<el-button type="primary">Click to upload</el-button>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip">jpg/png files with a size less than 500kb</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
import { ElUpload, ElButton } from 'element-plus';
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'ReferenceImage',
|
||||||
|
components: {
|
||||||
|
ElUpload,
|
||||||
|
ElButton
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
modelValue: {
|
||||||
|
type: String,
|
||||||
|
default: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {},
|
||||||
|
computed: {
|
||||||
|
headers() {
|
||||||
|
return {
|
||||||
|
Authorization: `Bearer ${this.$store.state.token.access}`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
handleSuccess(response) {
|
||||||
|
console.log('response', response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
.prompt {
|
||||||
|
color: #333;
|
||||||
|
font-size: 16px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
<preset-panel v-model="preset" />
|
<preset-panel v-model="preset" />
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<reference-image class="mb-4" />
|
||||||
<channel-selector v-model="channel" class="mb-4" @select="onSelectChannel" />
|
<channel-selector v-model="channel" class="mb-4" @select="onSelectChannel" />
|
||||||
<api-status :application="application" class="mb-4" />
|
<api-status :application="application" class="mb-4" />
|
||||||
<prompt-input v-model="prompt" class="mb-4" />
|
<prompt-input v-model="prompt" class="mb-4" />
|
||||||
@@ -26,6 +27,7 @@ import ElementsSelector from '@/components/midjourney/ElementsSelector.vue';
|
|||||||
import IgnoreSelector from '@/components/midjourney/IgnoreSelector.vue';
|
import IgnoreSelector from '@/components/midjourney/IgnoreSelector.vue';
|
||||||
import { ElButton } from 'element-plus';
|
import { ElButton } from 'element-plus';
|
||||||
import ChannelSelector from '@/components/midjourney/ChannelSelector.vue';
|
import ChannelSelector from '@/components/midjourney/ChannelSelector.vue';
|
||||||
|
import ReferenceImage from '@/components/midjourney/ReferenceImage.vue';
|
||||||
import {
|
import {
|
||||||
IApplication,
|
IApplication,
|
||||||
IMidjourneyChannel,
|
IMidjourneyChannel,
|
||||||
@@ -61,6 +63,7 @@ export default defineComponent({
|
|||||||
name: 'MidjourneyIndex',
|
name: 'MidjourneyIndex',
|
||||||
components: {
|
components: {
|
||||||
ChannelSelector,
|
ChannelSelector,
|
||||||
|
ReferenceImage,
|
||||||
PresetPanel,
|
PresetPanel,
|
||||||
PromptInput,
|
PromptInput,
|
||||||
ElementsSelector,
|
ElementsSelector,
|
||||||
|
|||||||
Reference in new issue
Block a user