fix: 避免编辑覆盖层触发画布选中
This commit is contained in:
1 parent
00edcedbcf
commit
14b6541bee
1 file changed
+3
@@ -207,6 +207,9 @@ export function ComponentTemplatePreview({
|
||||
onPointerLeave={() => setHovered(null)}
|
||||
onClickCapture={(event) => {
|
||||
if (mode !== "edit" || !targets.length) return;
|
||||
if (event.target instanceof Element && event.target.closest("[data-editor-overlay]")) {
|
||||
return;
|
||||
}
|
||||
const canvas = root.current?.querySelector(".component-template-preview__canvas");
|
||||
if (!event.target || !(event.target instanceof Node) || !canvas?.contains(event.target))
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user