Add price for model (#249)
This commit is contained in:
1 parent
a6b4cecb5d
commit
f8ca20981c
15 files changed
+231
-227
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="panel flex flex-col">
|
||||
<div class="flex-1 overflow-y-scroll p-4">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<is-videos-selector class="mb-2" />
|
||||
<model-selector v-if="!config.is_videos" class="mb-2" />
|
||||
<prompt-input class="mb-2" />
|
||||
@@ -17,7 +17,8 @@
|
||||
<image-weight-selector v-show="config.advanced" class="mb-2" />
|
||||
<style-selector v-show="config.advanced" class="mb-2" />
|
||||
</div>
|
||||
<div class="h-12 px-4">
|
||||
<div class="flex flex-col px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<div class="flex gap-1">
|
||||
<mode-selector />
|
||||
<el-button v-if="config.action === 'extend'" type="primary" class="btn w-full" round @click="$emit('generate')">
|
||||
@@ -50,6 +51,8 @@ import ModeSelector from './config/ModeSelector2.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import ReferenceImage from './config/ReferenceImage.vue';
|
||||
import { ElButton } from 'element-plus';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfigPanel',
|
||||
@@ -70,20 +73,20 @@ export default defineComponent({
|
||||
ImageWeightSelector,
|
||||
ReferenceImage,
|
||||
IsVideosSelector,
|
||||
ImageUrlInput
|
||||
ImageUrlInput,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.midjourney.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.midjourney?.service;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user