Skip to main content

Module surfaces

Module surfaces 

Source
Expand description

Positioned popovers, modal shells and the danger confirm dialog.

Structs§

ConfirmDialogProps
Props for the ConfirmDialog component.
ModalShellProps
Props for the ModalShell component.
PopoverProps
Props for the Popover component.

Constants§

EXIT_ANIM_MS
弹窗关闭/元素退出动画统一时长(ms),与 base.css 的 .modal-overlay / .modal-panel 关闭过渡对应; 调用方需要在动画播放完毕后再真正卸载/摘除元素时复用本常量。
MODAL_OVERLAY_BASE 🔒
弹窗遮罩基础类(不含内边距——不同弹窗尺寸的响应式内边距不同,经 overlay_padding 传入)。
MODAL_PANEL_BASE 🔒
弹窗面板基础类(不含宽度——不同弹窗尺寸不同,经 panel_class 传入追加)。
POPOVER_OVERLAY_CLASS 🔒
Popover 遮罩与面板的层级(z-40 遮罩 < z-50 面板),与 Tooltip/lightbox 同 z-50。

Functions§

ConfirmDialog
危险操作确认对话框(alertdialog):左侧 danger 图标、标题与说明,底栏「取消」与 danger 主按钮。点确认先关闭再回调 on_confirm,执行与结果提示由调用方负责。 title 同时作为面板的无障碍名称,同一时刻打开的对话框标题不能重复。
ModalShell
通用弹窗外壳:遮罩 + 面板容器 + 开合动画状态机(opened / closing / 退出计时)。
Popover
受控式通用 Popover(浮层)组件。