0.0.1-alpha.2 • Published 3 years ago

@belleui/belle-modal v0.0.1-alpha.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@belleui/belle-modal

Preview

screent shot

Install

npm install @belleui/belle-modal

Useage

Basic Useage

<belle-modal
  title="Basic Modal"
  .visible="${false}"
  @onOk=${handleOk}
  @onCancel=${handleCancel}
>
  <div style="width: 500px;">
    <p>弹窗的内容</p>
    <p>弹窗的内容</p>
    <p>弹窗的内容</p>
    <p>弹窗的内容</p>
    <p>...</p>
  </div>
</belle-modal>

Properties

PropertyAttributeTypeDefaultDescription
cancelTextcancelTextstring"取消"取消按钮文字
closableclosablebooleantrue是否显示右上角关闭按钮
footerfooterTemplateResult \| null""自定义footer,为null时不显示footer
maskClosablemaskClosablebooleantrue是否允许点击蒙层关闭
modalMaskHTMLElement
okTextokTextstring"确认"确认按钮文字
titletitlestring""弹窗标题
visiblevisiblebooleanfalse是否显示弹窗

Methods

MethodType
handleCancel(): void
handleOk(): void

Events

EventDescription
onCancel点击确定的回调函数
onOk关闭弹窗和点击取消的回调函数