mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: 优化画布中点击事件屏蔽,增加富文本组件的部分屏蔽
This commit is contained in:
parent
ca026b5f6a
commit
a5b65579ea
@ -375,12 +375,31 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
||||
x.initEvent('click', true);
|
||||
this._iframe?.dispatchEvent(x);
|
||||
const target = e.target as HTMLElement;
|
||||
if (
|
||||
isFormEvent(e) ||
|
||||
target?.closest(
|
||||
'.next-input-group,.next-checkbox-group,.next-date-picker,.next-input,.next-month-picker,.next-number-picker,.next-radio-group,.next-range,.next-range-picker,.next-rating,.next-select,.next-switch,.next-time-picker,.next-upload,.next-year-picker,.next-breadcrumb-item,.next-calendar-header,.next-calendar-table',
|
||||
)
|
||||
) {
|
||||
|
||||
// TODO: need more elegant solution to ignore click events of compoents in designer
|
||||
const ignoreSelectors: any = [
|
||||
'.next-input-group',
|
||||
'.next-checkbox-group',
|
||||
'.next-date-picker',
|
||||
'.next-input',
|
||||
'.next-month-picker',
|
||||
'.next-number-picker',
|
||||
'.next-radio-group',
|
||||
'.next-range',
|
||||
'.next-range-picker',
|
||||
'.next-rating',
|
||||
'.next-select',
|
||||
'.next-switch',
|
||||
'.next-time-picker',
|
||||
'.next-upload',
|
||||
'.next-year-picker',
|
||||
'.next-breadcrumb-item',
|
||||
'.next-calendar-header',
|
||||
'.next-calendar-table',
|
||||
'.editor-container', // 富文本组件
|
||||
];
|
||||
const ignoreSelectorsString = String.prototype.concat(ignoreSelectors);
|
||||
if (isFormEvent(e) || target?.closest(ignoreSelectorsString)) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user