Browse Source

fix: 指标修改

100011797 3 years ago
parent
commit
3612b29f64
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/components/FIndicators/index.tsx

+ 5 - 2
src/components/FIndicators/index.tsx

@@ -35,7 +35,7 @@ const FIndicators = (props: Props) => {
                 onChange({
                   ...value,
                   value: [
-                    val > value?.value?.[1] ? value?.value?.[0] : val,
+                    value?.value?.[1] && val > value?.value?.[1] ? value?.value?.[0] : val,
                     value?.value?.[1] || '',
                   ],
                 });
@@ -55,7 +55,10 @@ const FIndicators = (props: Props) => {
                 onChange={(val) => {
                   onChange({
                     ...value,
-                    value: [value?.value?.[0], val > value?.value?.[0] ? val : value?.value?.[1]],
+                    value: [
+                      value?.value?.[0],
+                      value?.value?.[0] && val > value?.value?.[0] ? val : value?.value?.[1],
+                    ],
                   });
                 }}
               />