Przeglądaj źródła

添加 channel = undefind判断

visuddhinanda 2 lat temu
rodzic
commit
3f1c33db3e
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      dashboard/src/components/term/TermEdit.tsx

+ 6 - 1
dashboard/src/components/term/TermEdit.tsx

@@ -296,7 +296,12 @@ const TermEditWidget = ({
         <ProFormDependency name={["channel"]}>
           {({ channel }) => {
             console.log("channel", channel);
-            return <LangSelect disabled={channel[0] === "" ? false : true} />;
+
+            return (
+              <LangSelect
+                disabled={channel ? (channel[0] === "" ? false : true) : false}
+              />
+            );
           }}
         </ProFormDependency>
       </ProForm.Group>