Skip to content

Commit cd25b9c

Browse files
committed
fix form
1 parent 82b8c0e commit cd25b9c

File tree

11 files changed

+25
-16
lines changed

11 files changed

+25
-16
lines changed

admin-pro-ui/src/components/flow/nodes/panel/circulate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {ProForm} from "@ant-design/pro-components";
33
import {Button, Drawer, Space, Tabs} from "antd";
44
import NodePanel from "@/components/flow/nodes/panel/NodePanel";
55
import EdgePanel from "@/components/flow/nodes/panel/EdgePanel";
6-
import {SettingPanelProps} from "@/components/flow/nodes/panel/panel.types";
6+
import {SettingPanelProps} from "@/components/flow/types";
77

88
const CirculateSettingPanel: React.FC<SettingPanelProps> = (props) => {
99

admin-pro-ui/src/components/flow/nodes/panel/node.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ import {Button, Drawer, Space, Tabs} from "antd";
44
import NodePanel from "@/components/flow/nodes/panel/NodePanel";
55
import EdgePanel from "@/components/flow/nodes/panel/EdgePanel";
66
import ButtonPanel from "@/components/flow/nodes/panel/ButtonPanel";
7+
import {SettingPanelProps} from "@/components/flow/types";
78

8-
interface SettingPanelProps {
9-
visible: boolean;
10-
setVisible: (visible: boolean) => void;
11-
properties: any;
12-
onSettingChange: (values: any) => void;
13-
}
149

1510
const NodeSettingPanel: React.FC<SettingPanelProps> = (props) => {
1611

admin-pro-ui/src/components/flow/nodes/panel/over.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import {ProForm} from "@ant-design/pro-components";
33
import {Button, Drawer, Space} from "antd";
44
import NodePanel from "@/components/flow/nodes/panel/NodePanel";
5-
import {SettingPanelProps} from "@/components/flow/nodes/panel/panel.types";
5+
import {SettingPanelProps} from "@/components/flow/types";
66

77
const OverSettingPanel: React.FC<SettingPanelProps> = (props) => {
88

admin-pro-ui/src/components/flow/nodes/panel/panel.types.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

admin-pro-ui/src/components/flow/nodes/panel/start.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {Button, Drawer, Space, Tabs} from "antd";
33
import EdgePanel from "@/components/flow/nodes/panel/EdgePanel";
44
import NodePanel from "@/components/flow/nodes/panel/NodePanel";
55
import {ProForm} from "@ant-design/pro-components";
6-
import {SettingPanelProps} from "@/components/flow/nodes/panel/panel.types";
76
import ButtonPanel from "@/components/flow/nodes/panel/ButtonPanel";
7+
import {SettingPanelProps} from "@/components/flow/types";
88

99
const StartSettingPanel: React.FC<SettingPanelProps> = (props) => {
1010

admin-pro-ui/src/components/flow/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,12 @@ export interface NodeButtonProperties {
4848
groovy:string;
4949
eventKey:string;
5050
}
51+
52+
53+
export interface SettingPanelProps {
54+
visible: boolean;
55+
setVisible: (visible: boolean) => void;
56+
properties: any;
57+
onSettingChange: (values: any) => void;
58+
}
59+

admin-pro-ui/src/components/form/captcha.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const Captcha:React.FC<FormItemProps> = (props)=>{
2929
className={"form-captcha-input"}
3030
disabled={props.disabled}
3131
value={props.value}
32+
addonAfter={props.addonAfter}
33+
addonBefore={props.addonBefore}
3234
placeholder={props.placeholder}
3335
onChange={(value) => {
3436
const currentValue = value.target.value;

admin-pro-ui/src/components/form/input.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const FormInput: React.FC<FormItemProps> = (props) => {
2323
type={inputType}
2424
placeholder={props.placeholder}
2525
maxLength={props.inputMaxLength}
26+
addonAfter={props.addonAfter}
27+
addonBefore={props.addonBefore}
2628
onChange={(value) => {
2729
const currentValue = value.target.value;
2830
formAction?.setFieldValue(props.name, currentValue);

admin-pro-ui/src/components/form/password.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const FormPassword: React.FC<FormItemProps> = (props) => {
1919
<Input.Password
2020
disabled={props.disabled}
2121
value={props.value}
22+
addonAfter={props.addonAfter}
23+
addonBefore={props.addonBefore}
2224
placeholder={props.placeholder}
2325
onChange={(value) => {
2426
const currentValue = value.target.value;

admin-pro-ui/src/components/form/stepper.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const FormStepper: React.FC<FormItemProps> = (props) => {
2020
style={{
2121
width:"100%"
2222
}}
23+
addonBefore={props.addonBefore}
24+
addonAfter={props.addonAfter}
2325
disabled={props.disabled}
2426
value={props.value}
2527
max={props.stepperMaxNumber}

admin-pro-ui/src/components/form/types.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export interface FormItemProps {
4949
label?: React.ReactNode;
5050
// 帮助提示信息
5151
help?: string;
52+
// 前缀
53+
addonBefore?:React.ReactNode;
54+
// 后缀
55+
addonAfter?:React.ReactNode;
5256
// 表单值
5357
value?: any;
5458
// 输入提示

0 commit comments

Comments
 (0)