マリアJeysingh暗部:
どのように反応するのHTMLタグと一緒に文字列を描画します。私は次の行に10秒でリダイレクトを追加したいが、私は代わりに、[オブジェクトのオブジェクト]を取得しています。
tip={"Please wait!" +<br/ >+"Redirecing in 10 seconds..."}
DEMO: CodeSandboxリンク
こうした:
よるドク:
Tip
である必要がありstring
、使用\n
改行のためと追加whiteSpace: "break-spaces
のスタイルにSpin
:
<Spin tip={"Please wait! \n Redirecing in 10 seconds..."} style={{ whiteSpace: "break-spaces"}}>
ReactDOM.render(
<antd.Spin tip={"Please wait! \n Redirecing in 10 seconds..."} style={{ whiteSpace: "break-spaces"}}>
<antd.Alert
message="Alert message title"
description="Further details about the context of this alert."
type="info"
/>
</antd.Spin>,
document.getElementById("container")
);
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/antd/4.0.2/antd.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/antd/4.0.2/antd.min.js"></script>
<div id="container"></div>