Nhảy tới nội dung

Action Sheet

Action Sheet là một slide-up pane, có thể sử dụng action sheets để nhắc nhở người dùng xác nhận sẽ thực hiện một hành động quan trọng/ nguy hiểm. Action sheet bao gồm tiêu đề và các Buttons, ngoài ra có thể tự tùy chỉnh.

Action Sheet Components​

Nhóm các component liên quan:

  • Actions - action sheet element
  • ActionsGroup - action sheet buttons group
  • ActionsButton - action sheet button
  • ActionsLabel - action sheet label

Action Sheet Properties​

<Actions/> properties​

PropTypeDefaultDescription
openedbooleanfalseGiúp mở/đóng Action sheet
backdropbooleantrueKích hoạt lớp overlay backdrop phía sau action sheet
backdropElstring | objectHTML element hoặc CSS selector của backdrop tùy chỉnh
closeByBackdropClickbooleantrueKhi kích hoạt, người dùng có thể đóng action sheet bằng cách click và backdrop
closeByOutsideClickbooleanfalseNếu bật, người dùng có thể đóng action sheet bằng cách click vào ngoài action sheet (trường hợp tắt backdrop)
animatebooleantrueBật/tắt hiệu ứng khi đóng/ mở action sheet modal
containerElHTMLElement | stringElement chứa action sheet modal, mặc định sẽ là app root element

<ActionsLabel/> properties​

PropTypeDefaultDescription
boldbooleanfalseĐặt font weight cho label thành bold

<ActionsButton/> properties​

PropTypeDefaultDescription
boldbooleanfalseĐặt font weight cho button thành bold
closebooleantrueQuyết định khi click button sẽ đóng action sheet hay không

Action Sheet Events​

EventPropDescription
actionsOpenonActionsOpenEvent sẽ khích hoạt khi Action Sheet bắt đầu mở
actionsOpenedonActionsOpenedEvent sẽ khích hoạt khi sau khi Action Sheet đã mở
actionsCloseonActionsCloseEvent sẽ khích hoạt khi Action Sheet bắt đầu đóng
actionsClosedonActionsClosedEvent sẽ khích hoạt khi sau khi Action Sheet đã đóng

Ví dụ​

Code demo fallback when rendering server side!