@@ -28,14 +28,14 @@ import { CopilotDocV1 } from 'models/copilot.schema'
28
28
29
29
import { useLevels } from '../../../apis/arknights'
30
30
import { findLevelByStageName } from '../../../models/level'
31
- import { FactItem } from '../../FactItem'
32
31
import { EditorOperatorName } from '../operator/EditorOperator'
33
32
import { EditorOperatorSkillUsage } from '../operator/EditorOperatorSkillUsage'
34
33
import {
35
34
EditorActionPreDelay ,
36
35
EditorActionRearDelay ,
37
36
} from './EditorActionDelay'
38
37
import { EditorActionDistance } from './EditorActionDistance'
38
+ import { EditorActionModule } from './EditorActionModule'
39
39
40
40
export interface EditorActionAddProps {
41
41
control : Control < CopilotDocV1 . Operation >
@@ -121,7 +121,7 @@ export const EditorActionAdd = ({
121
121
122
122
return (
123
123
< form onSubmit = { onSubmit } >
124
- < Card className = "mb-2 pb-8 pt-4 overflow-auto h-[calc(100vh-6rem)] " >
124
+ < Card className = "mb-2 pb-8 pt-4 overflow-auto" >
125
125
< div className = "flex items-center mb-4" >
126
126
< CardTitle className = "mb-0" icon = { isNew ? 'add' : 'edit' } >
127
127
< span > { isNew ? '添加' : '编辑' } 动作</ span >
@@ -258,8 +258,9 @@ export const EditorActionAdd = ({
258
258
259
259
< div className = "h-px w-full bg-gray-200 mt-4 mb-6" />
260
260
261
- < FactItem title = "执行条件" icon = "stopwatch" className = "font-bold" />
262
-
261
+ < EditorActionModule
262
+ title = "执行条件" icon = "stopwatch" className = "font-bold"
263
+ >
263
264
< div className = "flex flex-wrap" >
264
265
< EditorActionExecPredicateKills control = { control } />
265
266
< EditorActionExecPredicateCooling control = { control } />
@@ -272,39 +273,43 @@ export const EditorActionAdd = ({
272
273
< EditorActionPreDelay control = { control } />
273
274
< EditorActionRearDelay control = { control } />
274
275
</ div >
275
-
276
+ </ EditorActionModule >
276
277
< div className = "h-px w-full bg-gray-200 mt-4 mb-6" />
277
278
278
- < FactItem title = "日志" icon = "annotation" className = "font-bold" />
279
-
280
- < div className = "flex flex-col w-full" >
281
- < EditorActionDocColor
282
- shouldUnregister
283
- control = { control }
284
- name = "docColor"
285
- />
286
-
287
- < FormField
288
- label = "描述"
289
- field = "doc"
290
- control = { control }
291
- ControllerProps = { {
292
- render : ( { field } ) => (
293
- < TextArea
294
- fill
295
- rows = { 2 }
296
- growVertically
297
- large
298
- id = "doc"
299
- placeholder = "描述,可选。会显示在界面上,没有实际作用"
300
- { ...field }
301
- value = { field . value || '' }
302
- />
303
- ) ,
304
- } }
305
- />
306
- </ div >
279
+ < EditorActionModule
280
+ title = "日志"
281
+ icon = "annotation"
282
+ className = "font-bold"
283
+ >
284
+ < div className = "flex flex-col w-full" >
285
+ < EditorActionDocColor
286
+ shouldUnregister
287
+ control = { control }
288
+ name = "docColor"
289
+ />
307
290
291
+ < FormField
292
+ label = "描述"
293
+ field = "doc"
294
+ control = { control }
295
+ ControllerProps = { {
296
+ render : ( { field } ) => (
297
+ < TextArea
298
+ fill
299
+ rows = { 2 }
300
+ growVertically
301
+ large
302
+ id = "doc"
303
+ placeholder = "描述,可选。会显示在界面上,没有实际作用"
304
+ { ...field }
305
+ value = { field . value || '' }
306
+ />
307
+ ) ,
308
+ } }
309
+ />
310
+ </ div >
311
+ </ EditorActionModule >
312
+
308
313
< div className = "mt-4 flex" >
309
314
< Button intent = "primary" type = "submit" icon = { isNew ? 'add' : 'edit' } >
310
315
{ isNew ? '添加' : '保存' }
0 commit comments