iter(g98): 弹窗与抽屉补遮罩关闭开关
This commit is contained in:
@@ -15,7 +15,9 @@ export function drawer(props: DrawerProps, ...children: unknown[]): HTMLElement
|
||||
const overlay = h('div', {
|
||||
class: () => `ua-drawer-overlay${props.open() ? ' ua-open' : ''}`,
|
||||
onClick: (e: Event) => {
|
||||
if (e.target === overlay) close(); // 卫语句:仅点遮罩本身关闭
|
||||
if (e.target !== overlay) return; // 卫语句:只处理点在遮罩本身的
|
||||
if (props.closeOnOverlay === false) return; // 显式禁止时防误关,× 与 Esc 仍可用
|
||||
close();
|
||||
},
|
||||
});
|
||||
const panel = h(
|
||||
|
||||
Reference in New Issue
Block a user