📋 语法文档 & API 属性
1. 核心 API:useDisclosure
统一管理弹窗状态,替代 visible
const { visible, confirm, cancel, open } = OverlasticCore.useDisclosure(options)
| 参数 | 类型 | 说明 |
| onConfirm | Function | 确认回调 |
| onCancel | Function | 取消回调 |
2. 核心 API:defineOverlay
将组件转为 Promise 命令式调用
const openModal = OverlasticCore.defineOverlay(组件)
const result = await openModal(props)
3. 业务 API:createAntdModal
| props | 类型 | 默认 | 说明 |
| title | String | Overlastic 弹窗 | 弹窗标题 |
| inputValue | String | "" | 输入框初始值 |
4. 必需结构
<div id="overlastic-container"></div>