@beisen-phoenix/builder-modal

模式弹层

Usage no npm install needed!

<script type="module">
  import beisenPhoenixBuilderModal from 'https://cdn.skypack.dev/@beisen-phoenix/builder-modal';
</script>

README

@beisen-phoenix/builder-modal

模式弹层

API

参数 说明 类型 默认值
visible 是否显示 boolean false
hasMasker 是否显示遮罩层 boolean true
maskerClosable 点击遮罩是否关闭Modal boolean true
escClosable 点击ESC键是否关闭Modal boolean true
hideDocsBodyScrollbar 是否在打开弹层时,隐藏document.body的滚动条 boolean false
timeout 动画执行的最大时间 number 300
title 标题,不传表示不显示标题 string / React.ReactNode -
confirmText 确认按钮文字 string -
cancelText 取消按钮文字 string -
confirmLoading 确定按钮loading状态 boolean false
footer 自定义底部按钮区域,若传null则不显示底部 React.ReactNode / null -
translation 国际化,详情见下方 object -
onClose 点击遮罩层或右上角叉叉或按下键盘ESC键的回调 function(event) -
onConfirm 点击确定按钮的回调 function(event) -
onCancel 点击取消按钮的回调 function(event) -
afterOpen 打开之后的回调 function() -
afterClose 关闭之后的回调 function() -
extraCls 自定义组件容器class,一般用于覆盖组件默认样式使用 string
size 弹层大小 可选small large string small

translation

translation: {
  confirmText: '确定',
  cancelText: '取消'
}