update styles
This commit is contained in:
1 parent
f6b119f34f
commit
80abc61b80
17 files changed
+91
-24
No files matched your search
@@ -11,7 +11,7 @@
|
||||
<chaos-selector v-if="preset.advanced" v-model="preset.chaos" class="mb-4" />
|
||||
<image-weight-selector v-if="preset.advanced" v-model="preset.iw" class="mb-4" />
|
||||
<niji-selector v-if="false" v-model="preset.niji" class="mb-4" />
|
||||
<raw-selector v-if="preset.model == 'MJ' && preset.advanced" v-model="preset.raw" class="mb-4" />
|
||||
<raw-selector v-if="!preset.model && preset.advanced" v-model="preset.raw" class="mb-4" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -64,8 +64,13 @@ export default defineComponent({
|
||||
preset: {
|
||||
handler(val) {
|
||||
this.$emit('update:modelValue', val);
|
||||
console.debug('preset changed', val);
|
||||
this.$store.dispatch('setMidjourney', {
|
||||
preset: val
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="title">{{ $t('midjourney.name.prompt') }}</h2>
|
||||
<el-input v-model="value" :rows="5" type="textarea" :placeholder="$t('midjourney.placeholder.prompt')" />
|
||||
<el-input v-model="value" :rows="3" type="textarea" :placeholder="$t('midjourney.placeholder.prompt')" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:on-error="onError"
|
||||
:headers="headers"
|
||||
>
|
||||
<el-button type="primary">
|
||||
<el-button type="primary" class="btn btn-upload">
|
||||
<font-awesome-icon icon="fa-solid fa-upload" class="icon mr-2" />
|
||||
{{ $t('midjourney.button.uploadReferences') }}
|
||||
</el-button>
|
||||
@@ -87,4 +87,8 @@ export default defineComponent({
|
||||
font-size: 16px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn.btn-upload {
|
||||
border-radius: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="title">模型</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.model') }}</h2>
|
||||
<div class="items">
|
||||
<div
|
||||
v-for="(option, optionKey) in options"
|
||||
@@ -41,12 +41,12 @@ export default defineComponent({
|
||||
active: 0,
|
||||
options: [
|
||||
{
|
||||
value: 'MJ',
|
||||
value: '',
|
||||
label: '通用',
|
||||
image: 'https://cdn.zhishuyun.com/2023-10-06-174633.png'
|
||||
},
|
||||
{
|
||||
value: 'NIJI',
|
||||
value: 'niji',
|
||||
label: '动漫',
|
||||
image: 'https://cdn.zhishuyun.com/2023-10-06-174008.png'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">画质</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.quality') }}</h2>
|
||||
<el-radio-group v-model="value">
|
||||
<el-radio-button v-for="item in options" :key="item.value" :label="item.value">
|
||||
{{ item.label }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="title">图片比例</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.ratio') }}</h2>
|
||||
<div class="items">
|
||||
<div
|
||||
v-for="(option, optionKey) in options"
|
||||
@@ -39,7 +39,6 @@ export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
value: this.modelValue,
|
||||
active: 0,
|
||||
options: [
|
||||
{
|
||||
value: '1:1',
|
||||
@@ -74,6 +73,11 @@ export default defineComponent({
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
active() {
|
||||
return this.options.findIndex((option) => option.value === this.value);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
modelValue(val) {
|
||||
if (val !== this.value) {
|
||||
@@ -85,8 +89,10 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.value) {
|
||||
if (!this.modelValue) {
|
||||
this.value = DEFAULT_RATIO;
|
||||
} else {
|
||||
this.value = this.modelValue;
|
||||
}
|
||||
this.$emit('update:modelValue', this.value);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">版本</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.version') }}</h2>
|
||||
<el-select v-model="value" class="value" placeholder="Select">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="10" :offset="14">
|
||||
<div class="pagination m-v-lg">
|
||||
<div class="pagination">
|
||||
<pagination :current-page="page" :page-size="limit" :total="total" @change="onPageChange" />
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -177,5 +177,6 @@ export default defineComponent({
|
||||
|
||||
.pagination {
|
||||
height: 60px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -66,7 +66,7 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div v-else-if="!modelValue?.response" :class="{ operations: true, full }">
|
||||
<div v-else-if="!modelValue?.response" v-show="full" :class="{ operations: true, full }">
|
||||
<el-skeleton :rows="1" />
|
||||
</div>
|
||||
<div v-else v-show="full" :class="{ operations: true, full }">
|
||||
|
||||
Reference in new issue
Block a user