Skip to content

(Component) Alert

chejen edited this page Apr 16, 2017 · 1 revision

Alert

Sample code

let cmpALert;

<Alert ref={c => { cmpAlert = c; }}>
  放置想顯示的內容
</Alert>

// 顯示 Alert:cmpAlert.show();
// 關閉 Alert:cmpAlert.close();

Properties

Property Type Default Required Description
closeIn number 3000 (毫秒) - 預設會於 3 秒後自動關閉。將此值設為 0 可以停止自動關閉視窗功能。

Methods

Method Description
show() 顯示 Alert
close() 關閉 Alert