AngularDart Material Design 是/否 按鈕

MaterialYesNoButtonsComponent

Selector: <material-yes-no-buttons>git

兩個按鈕的組件水平相鄰,如是/否,保存/取消,贊成/不一樣意等。github

按鈕上的文字能夠更改,也能夠提升。 能夠選擇突出顯示「是」按鈕。dom

能夠使用MaterialSaveCancelButtonsDirective等指令來提供基本文本自定義,該指令用保存/取消替換是/否。異步

要以相反順序顯示按鈕,請添加reverse屬性。spa

Inputs:component

  • disabled bool 

    是否應禁用按鈕。事件

    默認值爲false。
     get

  • noDisplayed bool 源碼

    是否應顯示no按鈕。it

    默認值爲true。
     

  • noText String 

    要在取消按鈕上顯示的文本。

    例如,Dismiss,Not now等。默認值爲No.
     

  • pending bool 

    當pending爲true時,隱藏yes和no按鈕,並顯示一個微調器。

    這應該用於指示異步操做,例如保存或驗證輸入。

    默認值爲false
     

  • raised bool 

    是否應該提升按鈕。

    默認值爲false。
     

  • yesDisabled bool 

    是否應禁用「是」按鈕。

    默認值爲false。
     

  • yesDisplayed bool 

    是否應顯示是按鈕。

    默認值爲true。
     

  • yesHighlighted bool

    是否應突出顯示是按鈕。

    默認值爲false。
     

  • yesRaised bool 

    是否應該凸起是按鈕。

    默認值爲false。
     

  • yesText String 

    要在保存按鈕上顯示的文本。

    例如,Ok,Apply等。默認值爲yes。

Outputs:

  • no Stream<UIEvent> 

    沒有按下按鈕時要調用的回調。

    已發佈的事件是KeyboardEvent或MouseEvent
     

  • yes Stream<UIEvent> 

    按下「是」按鈕時要調用的回調。

    已發佈的事件是KeyboardEvent或MouseEvent

MaterialSaveCancelButtonsDirective

Selector: <material-yes-no-buttons[saveCancel]>

提供來自是/否按鈕的消息以進行保存/取消。

查看源碼

MaterialSubmitCancelButtonsDirective

Selector: <material-yes-no-buttons[submitCancel]>

提供來自是/否按鈕的默認消息以提交/取消。

查看源碼

KeyUpBoundaryDirective

Selector: <[keyupBoundary]>

標記應該處理BoundaryAwareKeyUpDirective實現的keyup事件的dom子樹。

查看源碼

EscapeCancelsDirective

Selector: <material-yes-no-buttons[escCancels]>

若是附加到yes-no按鈕,它將偵聽escape keyup事件並觸發無操做。

查看源碼

MaterialYesNoButtonsExample

查看示例,查看源碼

相關文章
相關標籤/搜索