valentichu 1 yıl önce
ebeveyn
işleme
57acfa2359
3 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 0 0
      lib/index.js
  2. 2 2
      src/App.jsx
  3. 3 2
      src/pages/Alarm/components/complex.jsx

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
lib/index.js


+ 2 - 2
src/App.jsx

@@ -15,8 +15,8 @@ function Home(props) {
         //   pointId: "ABC123_AAA_chr1_AEff_MIN_H",
         // }}
       ></Alarm.DetailModal> */}
-      {/* <Alarm.ComplexConfig editId={27} showList></Alarm.ComplexConfig> */}
-      <Alarm.EasyConfig pointId="ABC123_AAA_chr1_AEff_MIN_H" ></Alarm.EasyConfig>
+      <Alarm.ComplexConfig editId={27} showList></Alarm.ComplexConfig>
+      {/* <Alarm.EasyConfig pointId="ABC123_AAA_chr1_AEff_MIN_H" ></Alarm.EasyConfig> */}
 
     </>
   );

+ 3 - 2
src/pages/Alarm/components/complex.jsx

@@ -11,6 +11,7 @@ import Formular from "./components/Formular";
 import API2 from "../../../api/alarm";
 import styles from "./complex.module.less";
 import oneNode from "./components/oneNode";
+import { useMemoizedFn } from "ahooks";
 
 const { Search } = Input;
 
@@ -84,7 +85,7 @@ const Complex = (props, ref) => {
     run();
   }, [alarmId]);
 
-  const onModalOk = async () => {
+  const onModalOk = useMemoizedFn(async () => {
     if (type === 0) {
       props.onConfirm(null);
       return;
@@ -124,7 +125,7 @@ const Complex = (props, ref) => {
     }
     form.resetFields();
     props.onConfirm();
-  };
+  });
 
   useImperativeHandle(ref, () => {
     return {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor