GeezerVison is showing github.com — feat: pass e to customizeIgnoreSelectors · xzlinux/lowcode-engine@900b239
File tree
Expand file treeCollapse file tree
Open diff view settings
designer/src/builtin-simulator
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/designer/src/builtin-simulator/host.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -618,7 +618,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp |
618 | 618 | '.next-calendar-table', |
619 | 619 | '.editor-container', // 富文本组件 |
620 | 620 | ]; |
621 | | - const ignoreSelectors = customizeIgnoreSelectors?.(defaultIgnoreSelectors) || defaultIgnoreSelectors; |
| 621 | + const ignoreSelectors = customizeIgnoreSelectors?.(defaultIgnoreSelectors, e) || defaultIgnoreSelectors; |
622 | 622 | const ignoreSelectorsString = ignoreSelectors.join(','); |
623 | 623 | // 提供了 customizeIgnoreSelectors 的情况下,忽略 isFormEvent() 判断 |
624 | 624 | if ((!customizeIgnoreSelectors && isFormEvent(e)) || target?.closest(ignoreSelectorsString)) { |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/editor-core/src/config.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -73,7 +73,7 @@ const VALID_ENGINE_OPTIONS = { |
73 | 73 | customizeIgnoreSelectors: { |
74 | 74 | type: 'function', |
75 | 75 | default: undefined, |
76 | | - description: '定制画布中点击被忽略的 selectors, eg. (defaultIgnoreSelectors: string[]) => string[]', |
| 76 | + description: '定制画布中点击被忽略的 selectors, eg. (defaultIgnoreSelectors: string[], e: MouseEvent) => string[]', |
77 | 77 | }, |
78 | 78 | disableDefaultSettingPanel: { |
79 | 79 | type: 'boolean', |
@@ -192,7 +192,7 @@ export interface EngineOptions { |
192 | 192 | /** |
193 | 193 | * 定制画布中点击被忽略的 selectors,默认值:undefined |
194 | 194 | */ |
195 | | - customizeIgnoreSelectors?: (defaultIgnoreSelectors: string[]) => string[]; |
| 195 | + customizeIgnoreSelectors?: (defaultIgnoreSelectors: string[], e: MouseEvent) => string[]; |
196 | 196 | /** |
197 | 197 | * 禁止默认的设置面板,默认值:false |
198 | 198 | */ |
|