mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
feat: pass e to customizeIgnoreSelectors
This commit is contained in:
parent
6bb64f3aa1
commit
900b239432
@ -618,7 +618,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
||||
'.next-calendar-table',
|
||||
'.editor-container', // 富文本组件
|
||||
];
|
||||
const ignoreSelectors = customizeIgnoreSelectors?.(defaultIgnoreSelectors) || defaultIgnoreSelectors;
|
||||
const ignoreSelectors = customizeIgnoreSelectors?.(defaultIgnoreSelectors, e) || defaultIgnoreSelectors;
|
||||
const ignoreSelectorsString = ignoreSelectors.join(',');
|
||||
// 提供了 customizeIgnoreSelectors 的情况下,忽略 isFormEvent() 判断
|
||||
if ((!customizeIgnoreSelectors && isFormEvent(e)) || target?.closest(ignoreSelectorsString)) {
|
||||
|
||||
@ -73,7 +73,7 @@ const VALID_ENGINE_OPTIONS = {
|
||||
customizeIgnoreSelectors: {
|
||||
type: 'function',
|
||||
default: undefined,
|
||||
description: '定制画布中点击被忽略的 selectors, eg. (defaultIgnoreSelectors: string[]) => string[]',
|
||||
description: '定制画布中点击被忽略的 selectors, eg. (defaultIgnoreSelectors: string[], e: MouseEvent) => string[]',
|
||||
},
|
||||
disableDefaultSettingPanel: {
|
||||
type: 'boolean',
|
||||
@ -192,7 +192,7 @@ export interface EngineOptions {
|
||||
/**
|
||||
* 定制画布中点击被忽略的 selectors,默认值:undefined
|
||||
*/
|
||||
customizeIgnoreSelectors?: (defaultIgnoreSelectors: string[]) => string[];
|
||||
customizeIgnoreSelectors?: (defaultIgnoreSelectors: string[], e: MouseEvent) => string[];
|
||||
/**
|
||||
* 禁止默认的设置面板,默认值:false
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user