11<template >
2- <div class =" panel " >
3- <div class =" config " >
2+ <div class =" flex flex-col h-full " >
3+ <div class =" flex-1 overflow-y-auto p-[15px] " >
44 <prompt-input class =" mb-4" />
55 <model-selector class =" mb-4" />
66 <ratio-selector class =" mb-4" />
1010 <mode-selector class =" mb-4" />
1111 <cfg-scale-selector class =" mb-4" />
1212 <negative-prompt-input class =" mb-4" />
13- <div class =" actions" >
14- <el-button
15- v-if =" config?.video_url !== undefined || config?.custom"
16- type =" primary"
17- class =" btn w-full"
18- round
19- @click =" onGenerate"
20- >
21- <font-awesome-icon icon =" fa-solid fa-magic" class =" mr-2" />
22- {{ $t('kling.button.extend') }}
23- </el-button >
24- <el-button v-else type =" primary" class =" btn w-full" round @click =" onGenerate" >
25- <font-awesome-icon icon =" fa-solid fa-magic" class =" mr-2" />
26- {{ $t('kling.button.generate') }}
27- </el-button >
28- </div >
13+ </div >
14+ <div class =" flex flex-col items-center justify-center px-[15px] pb-[15px]" >
15+ <consumption :value =" consumption" :service =" service" />
16+ <el-button
17+ v-if =" config?.video_url !== undefined || config?.custom"
18+ type =" primary"
19+ class =" btn w-full"
20+ round
21+ @click =" onGenerate"
22+ >
23+ <font-awesome-icon icon =" fa-solid fa-magic" class =" mr-2" />
24+ {{ $t('kling.button.extend') }}
25+ </el-button >
26+ <el-button v-else type =" primary" class =" btn w-full" round @click =" onGenerate" >
27+ <font-awesome-icon icon =" fa-solid fa-magic" class =" mr-2" />
28+ {{ $t('kling.button.generate') }}
29+ </el-button >
2930 </div >
3031 </div >
3132</template >
@@ -40,14 +41,17 @@ import DurationSelector from './config/DurationSelector.vue';
4041import RatioSelector from ' ./config/RatioSelector.vue' ;
4142import StartImage from ' ./config/StartImage.vue' ;
4243import EndImage from ' ./config/EndImage.vue' ;
44+ import Consumption from ' ../common/Consumption.vue' ;
4345import CfgScaleSelector from ' ./config/CfgScaleSelector.vue' ;
4446import PromptInput from ' ./config/PromptInput.vue' ;
4547import NegativePromptInput from ' ./config/NegativePromptInput.vue' ;
48+ import { getConsumption } from ' @/utils' ;
4649
4750export default defineComponent ({
4851 name: ' ConfigPanel' ,
4952 components: {
5053 ElButton ,
54+ Consumption ,
5155 FontAwesomeIcon ,
5256 PromptInput ,
5357 NegativePromptInput ,
@@ -63,6 +67,12 @@ export default defineComponent({
6367 computed: {
6468 config() {
6569 return this .$store .state .kling ?.config ;
70+ },
71+ consumption() {
72+ return getConsumption (this .config , this .service ?.metadata ?.price );
73+ },
74+ service() {
75+ return this .$store .state .kling ?.service ;
6676 }
6777 },
6878 methods: {
@@ -72,28 +82,3 @@ export default defineComponent({
7282 }
7383});
7484 </script >
75-
76- <style lang="scss" scoped>
77- .panel {
78- height : 100% ;
79- padding : 15px ;
80- display : flex ;
81- flex-direction : column ;
82- flex : 1 ;
83- height : calc (100% - 40px );
84- .config {
85- width : 100% ;
86- height : calc (100% - 50px );
87- flex : 1 ;
88- }
89- .actions {
90- height : 50px ;
91- display : flex ;
92- justify-content : center ;
93- align-items : center ;
94- .btn {
95- width : 100% ;
96- }
97- }
98- }
99- </style >
0 commit comments