juzhiyuan commented on a change in pull request #218:
URL: 
https://github.com/apache/incubator-apisix-dashboard/pull/218#discussion_r431599121



##########
File path: src/pages/Routes/Create.tsx
##########
@@ -7,30 +7,25 @@ import styles from './Create.less';
 const { Step } = Steps;
 
 const Create: React.FC = () => {
-  const [step1PageData, setStep1PageData] = 
useState<RoutesModule.Step1PageDataProps>({
-    apiName: '',
-    protocol: '',
+  const [step1Data, setstep1Data] = useState<RoutesModule.step1DataProps>({

Review comment:
       setStep1Data

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (
+      <Row key={`${item.host + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
         <Col span={8}>
           <Input placeholder="IP/HOST" />
         </Col>
         <Col span={4}>
           <Input placeholder="PORT" />
         </Col>
         <Col span={4}>
-          <Input />
+          <Input placeholder="PRIORITY" />
+        </Col>
+        <Col span={4}>
+          <Space>
+            <Button
+              type="primary"
+              danger
+              onClick={() => {
+                const newHosts = hosts.filter((_, _index) => _index !== index);
+                onChange({ hosts: newHosts });
+              }}
+            >
+              删除
+            </Button>
+          </Space>
+        </Col>
+      </Row>
+    ));
+
+  const renderPaths = () =>
+    step1Data.path.map((item, index) => (

Review comment:
       ,

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (

Review comment:
       destruct on the top file?

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>

Review comment:
       handleRemove(key)

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -194,42 +214,53 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     </>
   );
 
-  const renderModal = () => {
-    const [modalForm] = Form.useForm();
-    const validateModalFields = modalForm.validateFields;
-    const { resetFields } = modalForm;
-    const handleOk = () => {
-      validateModalFields().then((value) => {
-        const { advancedConfig } = step1PageData;
-        onChange({
-          advancedConfig: advancedConfig.concat({
-            ...(value as RoutesModule.Step1ModalProps),
-            key: Math.random().toString(36).slice(2),
-          }),
-        });
+  const [modalForm] = Form.useForm();
+  const validateModalFields = modalForm.validateFields;
+  const handleOk = () => {
+    validateModalFields().then((value) => {

Review comment:
       modalForm.validateFields

##########
File path: src/pages/Routes/typing.d.ts
##########
@@ -1,32 +1,32 @@
 declare namespace RoutesModule {
   interface Step1ModalProps {
-    paramsLocation: string;
+    paramsLocation: 'query' | 'params' | 'header' | 'cookie';
     paramsName: string;
-    paramsExpresstion: string;
+    paramsExpresstion: '==' | '~=' | '>' | '<' | '~~';
     paramsValue: string;
-    remark?: string;
+    remark: string;
     key: string;
   }
 
   interface Step1HostProps {
     host: string;
-    port: string;
-    priority: string;
+    port: number;
+    priority: number;
   }
 
-  interface Step1PageDataProps {
-    apiName: string;
-    protocol: string;
+  interface step1DataProps {
+    name: string;
+    protocol: [];
     hosts: Step1HostProps[];
-    requestPath: string;
+    path: string[];

Review comment:
       ,

##########
File path: src/pages/Routes/Create.tsx
##########
@@ -7,30 +7,25 @@ import styles from './Create.less';
 const { Step } = Steps;
 
 const Create: React.FC = () => {
-  const [step1PageData, setStep1PageData] = 
useState<RoutesModule.Step1PageDataProps>({
-    apiName: '',
-    protocol: '',
+  const [step1Data, setstep1Data] = useState<RoutesModule.step1DataProps>({
+    name: '',
+    protocol: [],
     hosts: [],
-    requestPath: '',
+    path: [],

Review comment:
       `paths`

##########
File path: src/pages/Routes/Create.tsx
##########
@@ -7,30 +7,25 @@ import styles from './Create.less';
 const { Step } = Steps;
 
 const Create: React.FC = () => {
-  const [step1PageData, setStep1PageData] = 
useState<RoutesModule.Step1PageDataProps>({
-    apiName: '',
-    protocol: '',
+  const [step1Data, setstep1Data] = useState<RoutesModule.step1DataProps>({

Review comment:
       `RoutesModule.Step1Data`

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -36,14 +27,19 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     setModalVisible(true);
   };
 
-  const handleEdit = (text: any, record: any) => {
+  const handleEdit = (record: any) => {
     setEditModalData(record);
+    requestAnimationFrame(() => {
+      setModalVisible(true);
+    });
   };
 
-  const handleDelete = (text: any, record: any) => {
-    const { advancedConfig } = step1PageData;
-    const filteredAdvancedConfig = advancedConfig.filter((item) => item.key 
!== record.key);
-    onChange({ advancedConfig: filteredAdvancedConfig });
+  const handleDelete = (record: any) => {

Review comment:
       `handleRemove`
   
   keep the same as SSL

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -36,14 +27,19 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     setModalVisible(true);
   };
 
-  const handleEdit = (text: any, record: any) => {
+  const handleEdit = (record: any) => {
     setEditModalData(record);
+    requestAnimationFrame(() => {
+      setModalVisible(true);
+    });
   };
 
-  const handleDelete = (text: any, record: any) => {
-    const { advancedConfig } = step1PageData;
-    const filteredAdvancedConfig = advancedConfig.filter((item) => item.key 
!== record.key);
-    onChange({ advancedConfig: filteredAdvancedConfig });
+  const handleDelete = (record: any) => {

Review comment:
       `const x = (key: string) => {}`

##########
File path: src/pages/Routes/Create.tsx
##########
@@ -7,30 +7,25 @@ import styles from './Create.less';
 const { Step } = Steps;
 
 const Create: React.FC = () => {
-  const [step1PageData, setStep1PageData] = 
useState<RoutesModule.Step1PageDataProps>({
-    apiName: '',
-    protocol: '',
+  const [step1Data, setstep1Data] = useState<RoutesModule.step1DataProps>({
+    name: '',
+    protocol: [],
     hosts: [],
-    requestPath: '',
+    path: [],
     httpMethods: [],
-    advancedConfig: [],
+    advancedMatchingRules: [],
   });
 
-  const [currentStep, setCurrentStep] = useState(0);
-  const [stepHeader, setStepHeader] = useState(['定义API请求', '定义API后端服务', '插件', 
'预览']);
-  const pageData = {
-    step1PageData,
+  const [currentStep] = useState(0);
+  const [stepHeader] = useState(['定义 API 请求', '定义 API 后端服务', '插件配置', '预览']);
+  const data = {
+    step1Data,
   };
 
-  const handleChange = (step: number, data: RoutesModule.Step1PageDataProps) 
=> {
+  const handleChange = (step: number, params: RoutesModule.step1DataProps) => {
     switch (step) {
       case 0:
-        setStep1PageData({ ...step1PageData, ...data });
-        break;
-      case 1:
-        // TODO: base on data show different step
-        setCurrentStep(1);
-        setStepHeader(['定义API请求', '定义API后端服务', '预览']);
+        setstep1Data({ ...step1Data, ...params });

Review comment:
       ,

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (
+      <Row key={`${item.host + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
         <Col span={8}>
           <Input placeholder="IP/HOST" />
         </Col>
         <Col span={4}>
           <Input placeholder="PORT" />
         </Col>
         <Col span={4}>
-          <Input />
+          <Input placeholder="PRIORITY" />

Review comment:
       Weight

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (
+      <Row key={`${item.host + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
         <Col span={8}>
           <Input placeholder="IP/HOST" />
         </Col>
         <Col span={4}>
           <Input placeholder="PORT" />
         </Col>
         <Col span={4}>
-          <Input />
+          <Input placeholder="PRIORITY" />
+        </Col>
+        <Col span={4}>
+          <Space>
+            <Button
+              type="primary"
+              danger
+              onClick={() => {
+                const newHosts = hosts.filter((_, _index) => _index !== index);
+                onChange({ hosts: newHosts });

Review comment:
       `onChange({hosts: hosts.filter((_, _index) => _index !== index)})`

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -36,14 +27,19 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     setModalVisible(true);
   };
 
-  const handleEdit = (text: any, record: any) => {
+  const handleEdit = (record: any) => {

Review comment:
       any?

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (
+      <Row key={`${item.host + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
         <Col span={8}>
           <Input placeholder="IP/HOST" />
         </Col>
         <Col span={4}>
           <Input placeholder="PORT" />
         </Col>
         <Col span={4}>
-          <Input />
+          <Input placeholder="PRIORITY" />
+        </Col>
+        <Col span={4}>
+          <Space>
+            <Button
+              type="primary"
+              danger
+              onClick={() => {
+                const newHosts = hosts.filter((_, _index) => _index !== index);
+                onChange({ hosts: newHosts });
+              }}
+            >
+              删除
+            </Button>
+          </Space>
+        </Col>
+      </Row>
+    ));
+
+  const renderPaths = () =>
+    step1Data.path.map((item, index) => (
+      <Row key={`${item + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
+        <Col span={16}>
+          <Input placeholder="请输入 PATH" />
         </Col>
         <Col span={4}>
           <Space>
             <Button
               type="primary"
               danger
               onClick={() => {
-                const { hosts } = step1PageData;
-                hosts.splice(index, 1);
-                onChange({ hosts });
+                const newpath = path.filter((_, _index) => _index !== index);

Review comment:
       ,

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -194,42 +214,53 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     </>
   );
 
-  const renderModal = () => {
-    const [modalForm] = Form.useForm();
-    const validateModalFields = modalForm.validateFields;
-    const { resetFields } = modalForm;
-    const handleOk = () => {
-      validateModalFields().then((value) => {
-        const { advancedConfig } = step1PageData;
-        onChange({
-          advancedConfig: advancedConfig.concat({
-            ...(value as RoutesModule.Step1ModalProps),
-            key: Math.random().toString(36).slice(2),
-          }),
-        });
+  const [modalForm] = Form.useForm();
+  const validateModalFields = modalForm.validateFields;
+  const handleOk = () => {
+    validateModalFields().then((value) => {
+      const { advancedMatchingRules } = step1Data;
+      onChange({
+        advancedMatchingRules: advancedMatchingRules.concat({
+          ...(value as RoutesModule.Step1ModalProps),
+          key: Math.random().toString(36).slice(2),
+        }),
       });
-    };
-
-    const handleCancel = () => {
       setModalVisible(false);
-    };
+    });
+  };
 
-    const handleAfterClose = () => {
-      resetFields();
-    };
-    return (
-      <>
-        <Modal
-          title="新增"
-          centered
-          visible={modalVisible}
-          afterClose={handleAfterClose}
-          onOk={handleOk}
-          onCancel={handleCancel}
-          destroyOnClose
+  const handleCancel = () => {
+    setModalVisible(false);
+  };
+
+  const renderadvancedMatchingRules = () => (
+    <>
+      <PanelSection title="高级路由匹配条件" />

Review comment:
       .....

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (
+      <Row key={`${item.host + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
         <Col span={8}>
           <Input placeholder="IP/HOST" />
         </Col>
         <Col span={4}>
           <Input placeholder="PORT" />
         </Col>
         <Col span={4}>
-          <Input />
+          <Input placeholder="PRIORITY" />
+        </Col>
+        <Col span={4}>
+          <Space>
+            <Button
+              type="primary"
+              danger
+              onClick={() => {
+                const newHosts = hosts.filter((_, _index) => _index !== index);
+                onChange({ hosts: newHosts });
+              }}
+            >
+              删除
+            </Button>
+          </Space>
+        </Col>
+      </Row>
+    ));
+
+  const renderPaths = () =>
+    step1Data.path.map((item, index) => (
+      <Row key={`${item + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
+        <Col span={16}>
+          <Input placeholder="请输入 PATH" />

Review comment:
       。。。Path or 路径

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -75,53 +71,70 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     {
       title: '操作',
       key: 'action',
-      render: (text: any, record: any) => (
+      render: (_: any, record: any) => (
         <Space size="middle">
-          <a onClick={() => handleEdit(text, record)}>编辑</a>
-          <a onClick={() => handleDelete(text, record)}>移除</a>
+          <a onClick={() => handleEdit(record)}>编辑</a>
+          <a onClick={() => handleDelete(record)}>移除</a>
         </Space>
       ),
     },
   ];
 
   const addHost = () => {
-    const { hosts } = step1PageData;
     onChange({
       hosts: hosts.concat([
         {
           host: '',
-          port: '',
-          priority: '',
+          port: 0,
+          priority: 0,
         },
       ]),
     });
   };
 
   const renderHosts = () =>
-    step1PageData.hosts?.map((item, index) => (
-      <Row
-        key={Math.random().toString(36).slice(2)}
-        style={{ marginBottom: '10px' }}
-        gutter={[16, 16]}
-      >
+    step1Data.hosts.map((item, index) => (
+      <Row key={`${item.host + index}`} style={{ marginBottom: '10px' }} 
gutter={[16, 16]}>
         <Col span={8}>
           <Input placeholder="IP/HOST" />
         </Col>
         <Col span={4}>
           <Input placeholder="PORT" />
         </Col>
         <Col span={4}>
-          <Input />
+          <Input placeholder="PRIORITY" />
+        </Col>
+        <Col span={4}>
+          <Space>
+            <Button
+              type="primary"
+              danger
+              onClick={() => {
+                const newHosts = hosts.filter((_, _index) => _index !== index);

Review comment:
       extra variable 

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -194,42 +214,53 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     </>
   );
 
-  const renderModal = () => {
-    const [modalForm] = Form.useForm();
-    const validateModalFields = modalForm.validateFields;
-    const { resetFields } = modalForm;
-    const handleOk = () => {
-      validateModalFields().then((value) => {
-        const { advancedConfig } = step1PageData;
-        onChange({
-          advancedConfig: advancedConfig.concat({
-            ...(value as RoutesModule.Step1ModalProps),
-            key: Math.random().toString(36).slice(2),
-          }),
-        });
+  const [modalForm] = Form.useForm();
+  const validateModalFields = modalForm.validateFields;
+  const handleOk = () => {
+    validateModalFields().then((value) => {
+      const { advancedMatchingRules } = step1Data;
+      onChange({
+        advancedMatchingRules: advancedMatchingRules.concat({
+          ...(value as RoutesModule.Step1ModalProps),
+          key: Math.random().toString(36).slice(2),
+        }),
       });
-    };
-
-    const handleCancel = () => {
       setModalVisible(false);
-    };
+    });
+  };
 
-    const handleAfterClose = () => {
-      resetFields();
-    };
-    return (
-      <>
-        <Modal
-          title="新增"
-          centered
-          visible={modalVisible}
-          afterClose={handleAfterClose}
-          onOk={handleOk}
-          onCancel={handleCancel}
-          destroyOnClose
+  const handleCancel = () => {
+    setModalVisible(false);
+  };
+
+  const renderadvancedMatchingRules = () => (
+    <>
+      <PanelSection title="高级路由匹配条件" />

Review comment:
       ```tsx
   <PanelSection title="xxx">
    <Button
             onClick={handleAdd}
             type="primary"
             style={{
               marginBottom: 16,
             }}
           >
             新增
           </Button>
           <Table
             key="table"
             bordered
             dataSource={step1Data.advancedMatchingRules}
             columns={columns}
           />
   </PanelSection>
   ```

##########
File path: src/pages/Routes/components/Step1/index.tsx
##########
@@ -194,42 +214,53 @@ const Step1: React.FC<RoutesModule.StepProps> = ({ 
pageData, onChange }) => {
     </>
   );
 
-  const renderModal = () => {
-    const [modalForm] = Form.useForm();
-    const validateModalFields = modalForm.validateFields;
-    const { resetFields } = modalForm;
-    const handleOk = () => {
-      validateModalFields().then((value) => {
-        const { advancedConfig } = step1PageData;
-        onChange({
-          advancedConfig: advancedConfig.concat({
-            ...(value as RoutesModule.Step1ModalProps),
-            key: Math.random().toString(36).slice(2),
-          }),
-        });
+  const [modalForm] = Form.useForm();
+  const validateModalFields = modalForm.validateFields;
+  const handleOk = () => {
+    validateModalFields().then((value) => {
+      const { advancedMatchingRules } = step1Data;
+      onChange({
+        advancedMatchingRules: advancedMatchingRules.concat({
+          ...(value as RoutesModule.Step1ModalProps),
+          key: Math.random().toString(36).slice(2),
+        }),
       });
-    };
-
-    const handleCancel = () => {
       setModalVisible(false);
-    };
+    });
+  };
 
-    const handleAfterClose = () => {
-      resetFields();
-    };
-    return (
-      <>
-        <Modal
-          title="新增"
-          centered
-          visible={modalVisible}
-          afterClose={handleAfterClose}
-          onOk={handleOk}
-          onCancel={handleCancel}
-          destroyOnClose
+  const handleCancel = () => {
+    setModalVisible(false);
+  };
+
+  const renderadvancedMatchingRules = () => (

Review comment:
       renderAdvancedXXX




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to