@@ -16,7 +16,9 @@ import { Alert, Col, Divider, message, Segmented } from "antd";
1616import { KelingAI , KelingApiTypes } from "@/app/providers/keling-ai" ;
1717import { RenderSubmitter } from "../render" ;
1818
19- const MODE_OPTIONS = [ { label : "Std-标准模式(高性能)" , value : "std" } , { label : "Pro-专家模式(高表现)" , value : "pro" } ,
19+ const MODE_OPTIONS = [
20+ { label : "Std-标准模式(高性能)" , value : "std" } ,
21+ { label : "Pro-专家模式(高表现)" , value : "pro" } ,
2022] ;
2123
2224const DURATION_OPTIONS = [
@@ -98,14 +100,25 @@ const KelingPage = () => {
98100 < ProFormTextArea
99101 name = { "prompt" }
100102 label = { "Prompt" }
101- rules = { [ { required : true } , { type : "string" , max : 2500 } ] }
103+ rules = { [
104+ { required : true } ,
105+ {
106+ type : "string" ,
107+ max : 2500 ,
108+ } ,
109+ ] }
102110 fieldProps = { { autoSize : { minRows : 3 } } }
103111 tooltip = { "正向文本提示" }
104112 />
105113 < ProFormTextArea
106114 name = { "negative_prompt" }
107115 label = { "Negative Prompt" }
108- rules = { [ { type : "string" , max : 2500 } ] }
116+ rules = { [
117+ {
118+ type : "string" ,
119+ max : 2500 ,
120+ } ,
121+ ] }
109122 fieldProps = { { autoSize : { minRows : 2 } } }
110123 tooltip = { "负向文本提示,用于排除不需要的元素或风格" }
111124 />
@@ -115,7 +128,13 @@ const KelingPage = () => {
115128 min = { 0 }
116129 max = { 1 }
117130 step = { 0.01 }
118- marks = { { 0 : "0" , 0.25 : "0.25" , 0.5 : "0.5" , 0.75 : "0.75" , 1 : "1" } }
131+ marks = { {
132+ 0 : "0" ,
133+ 0.25 : "0.25" ,
134+ 0.5 : "0.5" ,
135+ 0.75 : "0.75" ,
136+ 1 : "1" ,
137+ } }
119138 tooltip = { "生成视频的自由度,值越大,模型自由度越小,与用户输入的提示词相关性越强" }
120139 />
121140
@@ -133,11 +152,26 @@ const KelingPage = () => {
133152 name = { [ "camera_control" , "type" ] }
134153 label = { "Type" }
135154 options = { [
136- { label : "Simple" , value : "simple" } ,
137- { label : "Down Back" , value : "down_back" } ,
138- { label : "Forward Up" , value : "forward_up" } ,
139- { label : "Right Turn Forward" , value : "right_turn_forward" } ,
140- { label : "Left Turn Forward" , value : "left_turn_forward" } ,
155+ {
156+ label : "Simple" ,
157+ value : "simple" ,
158+ } ,
159+ {
160+ label : "Down Back" ,
161+ value : "down_back" ,
162+ } ,
163+ {
164+ label : "Forward Up" ,
165+ value : "forward_up" ,
166+ } ,
167+ {
168+ label : "Right Turn Forward" ,
169+ value : "right_turn_forward" ,
170+ } ,
171+ {
172+ label : "Left Turn Forward" ,
173+ value : "left_turn_forward" ,
174+ } ,
141175 ] }
142176 tooltip = {
143177 < >
@@ -176,7 +210,11 @@ const KelingPage = () => {
176210 min = { - 10 }
177211 max = { 10 }
178212 step = { 0.1 }
179- marks = { { [ - 10 ] : "-10" , 0 : "0" , 10 : "10" } }
213+ marks = { {
214+ [ - 10 ] : "-10" ,
215+ 0 : "0" ,
216+ 10 : "10" ,
217+ } }
180218 initialValue = { 0 }
181219 tooltip = { "水平运镜,控制摄像机在水平方向上的移动量(沿x轴平移)" }
182220 />
@@ -186,7 +224,11 @@ const KelingPage = () => {
186224 min = { - 10 }
187225 max = { 10 }
188226 step = { 0.1 }
189- marks = { { [ - 10 ] : "-10" , 0 : "0" , 10 : "10" } }
227+ marks = { {
228+ [ - 10 ] : "-10" ,
229+ 0 : "0" ,
230+ 10 : "10" ,
231+ } }
190232 initialValue = { 0 }
191233 tooltip = { "垂直运镜,控制摄像机在垂直方向上的移动量(沿y轴平移)" }
192234 />
@@ -197,7 +239,11 @@ const KelingPage = () => {
197239 min = { - 10 }
198240 max = { 10 }
199241 step = { 0.1 }
200- marks = { { [ - 10 ] : "-10" , 0 : "0" , 10 : "10" } }
242+ marks = { {
243+ [ - 10 ] : "-10" ,
244+ 0 : "0" ,
245+ 10 : "10" ,
246+ } }
201247 initialValue = { 0 }
202248 tooltip = { "水平摇镜,控制摄像机在水平方向上的旋转量(沿x轴旋转)" }
203249 />
@@ -207,7 +253,11 @@ const KelingPage = () => {
207253 min = { - 10 }
208254 max = { 10 }
209255 step = { 0.1 }
210- marks = { { [ - 10 ] : "-10" , 0 : "0" , 10 : "10" } }
256+ marks = { {
257+ [ - 10 ] : "-10" ,
258+ 0 : "0" ,
259+ 10 : "10" ,
260+ } }
211261 initialValue = { 0 }
212262 tooltip = { "垂直摇镜,控制摄像机在垂直方向上的旋转量(沿y轴旋转)" }
213263 />
@@ -217,7 +267,11 @@ const KelingPage = () => {
217267 min = { - 10 }
218268 max = { 10 }
219269 step = { 0.1 }
220- marks = { { [ - 10 ] : "-10" , 0 : "0" , 10 : "10" } }
270+ marks = { {
271+ [ - 10 ] : "-10" ,
272+ 0 : "0" ,
273+ 10 : "10" ,
274+ } }
221275 initialValue = { 0 }
222276 tooltip = { "旋转运镜,控制摄像机的滚动量(绕z轴旋转)" }
223277 />
@@ -227,7 +281,11 @@ const KelingPage = () => {
227281 min = { - 10 }
228282 max = { 10 }
229283 step = { 0.1 }
230- marks = { { [ - 10 ] : "-10" , 0 : "0" , 10 : "10" } }
284+ marks = { {
285+ [ - 10 ] : "-10" ,
286+ 0 : "0" ,
287+ 10 : "10" ,
288+ } }
231289 initialValue = { 0 }
232290 tooltip = { "变焦,控制摄像机的焦距变化,影响视野的远近" }
233291 />
@@ -240,7 +298,12 @@ const KelingPage = () => {
240298 < ProFormText
241299 name = { "callback_url" }
242300 label = { "Callback URL" }
243- rules = { [ { type : "url" , warningOnly : true } ] }
301+ rules = { [
302+ {
303+ type : "url" ,
304+ warningOnly : true ,
305+ } ,
306+ ] }
244307 tooltip = { "本次任务结果回调通知地址" }
245308 />
246309 </ ProForm >
@@ -330,13 +393,23 @@ const KelingPage = () => {
330393 < ProFormTextArea
331394 name = "prompt"
332395 label = "Prompt"
333- rules = { [ { type : "string" , max : 2500 } ] }
396+ rules = { [
397+ {
398+ type : "string" ,
399+ max : 2500 ,
400+ } ,
401+ ] }
334402 fieldProps = { { autoSize : { minRows : 3 } } }
335403 />
336404 < ProFormTextArea
337405 name = "negative_prompt"
338406 label = "Negative Prompt"
339- rules = { [ { type : "string" , max : 2500 } ] }
407+ rules = { [
408+ {
409+ type : "string" ,
410+ max : 2500 ,
411+ } ,
412+ ] }
340413 fieldProps = { { autoSize : { minRows : 2 } } }
341414 />
342415 < ProFormSlider
@@ -345,9 +418,24 @@ const KelingPage = () => {
345418 min = { 0 }
346419 max = { 1 }
347420 step = { 0.01 }
348- marks = { { 0 : "0" , 0.25 : "0.25" , 0.5 : "0.5" , 0.75 : "0.75" , 1 : "1" } }
421+ marks = { {
422+ 0 : "0" ,
423+ 0.25 : "0.25" ,
424+ 0.5 : "0.5" ,
425+ 0.75 : "0.75" ,
426+ 1 : "1" ,
427+ } }
428+ />
429+ < ProFormText
430+ name = "callback_url"
431+ label = "Callback URL"
432+ rules = { [
433+ {
434+ type : "url" ,
435+ warningOnly : true ,
436+ } ,
437+ ] }
349438 />
350- < ProFormText name = "callback_url" label = "Callback URL" rules = { [ { type : "url" , warningOnly : true } ] } />
351439 </ ProForm >
352440 ) ;
353441 } ;
@@ -425,9 +513,18 @@ const KelingPage = () => {
425513 < Segmented
426514 { ...SEGMENTED_PROPS }
427515 options = { [
428- { label : "文生视频" , value : "text2video" } ,
429- { label : "图生视频" , value : "image2video" } ,
430- { label : "任务查询" , value : "queryTask" } ,
516+ {
517+ label : "文生视频" ,
518+ value : "text2video" ,
519+ } ,
520+ {
521+ label : "图生视频" ,
522+ value : "image2video" ,
523+ } ,
524+ {
525+ label : "任务查询" ,
526+ value : "queryTask" ,
527+ } ,
431528 ] }
432529 value = { taskType }
433530 onChange = { setTaskType }
0 commit comments