修复:头像弹窗点击遮罩层关闭
头像选择弹窗缺少 data-avatar-picker-overlay / data-avatar-picker-panel 属性及遮罩层点击关闭逻辑。参考设置弹窗的模式添加。 改动: - toolbar.blade.php:添加 data-avatar-picker-overlay 和 data-avatar-picker-panel - profile-controls.js:添加遮罩层点击关闭处理
This commit is contained in:
@@ -703,6 +703,11 @@ export function bindProfileControls() {
|
||||
if (event.target.closest("[data-settings-modal-overlay]")) {
|
||||
closeSettingsModal();
|
||||
}
|
||||
|
||||
// ── 头像选择弹窗:点击遮罩层关闭 ──
|
||||
if (event.target.closest("[data-avatar-picker-overlay]") && !event.target.closest("[data-avatar-picker-panel]")) {
|
||||
closeAvatarPicker();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("change", (event) => {
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
</div>
|
||||
|
||||
{{-- ═══════════ 头像选择弹窗 ═══════════ --}}
|
||||
<div id="avatar-picker-modal"
|
||||
<div id="avatar-picker-modal" data-avatar-picker-overlay
|
||||
style="display:none; position:fixed; top:0; left:0; right:0; bottom:0;
|
||||
background:rgba(0,0,0,0.5); z-index:9999; justify-content:center; align-items:center;">
|
||||
<div
|
||||
<div data-avatar-picker-panel
|
||||
style="background:#fff; width:600px; max-height:80vh; border-radius:6px; overflow:hidden;
|
||||
box-shadow:0 4px 20px rgba(0,0,0,0.3); display:flex; flex-direction:column;">
|
||||
{{-- 标题栏 --}}
|
||||
|
||||
Reference in New Issue
Block a user