소스 검색

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