Преглед на файлове

用Space 把图标和内容分开

visuddhinanda преди 1 година
родител
ревизия
3c712f580a
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      dashboard-v4/dashboard/src/components/template/Wbw/WbwFactorsEditor.tsx

+ 3 - 2
dashboard-v4/dashboard/src/components/template/Wbw/WbwFactorsEditor.tsx

@@ -4,6 +4,7 @@ import { LoadingOutlined, WarningOutlined } from "@ant-design/icons";
 import WbwFactors from "./WbwFactors";
 import WbwFactors from "./WbwFactors";
 import { IWbw, TWbwDisplayMode } from "./WbwWord";
 import { IWbw, TWbwDisplayMode } from "./WbwWord";
 import { IPreferenceResponse } from "../../api/Dict";
 import { IPreferenceResponse } from "../../api/Dict";
+import { Space } from "antd";
 
 
 interface IWidget {
 interface IWidget {
   initValue: IWbw;
   initValue: IWbw;
@@ -15,7 +16,7 @@ const WbwFactorsEditor = ({ initValue, display, onChange }: IWidget) => {
   const [error, setError] = useState(false);
   const [error, setError] = useState(false);
 
 
   return (
   return (
-    <>
+    <Space>
       {loading ? <LoadingOutlined /> : error ? <WarningOutlined /> : <></>}
       {loading ? <LoadingOutlined /> : error ? <WarningOutlined /> : <></>}
       <WbwFactors
       <WbwFactors
         key="factors"
         key="factors"
@@ -34,7 +35,7 @@ const WbwFactorsEditor = ({ initValue, display, onChange }: IWidget) => {
           }
           }
         }}
         }}
       />
       />
-    </>
+    </Space>
   );
   );
 };
 };