mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix dispatch events
This commit is contained in:
parent
f463fe8c6b
commit
3b6dd61f3c
@ -38,7 +38,6 @@ export class BuiltinSimulatorHostView extends Component<SimulatorHostProps> {
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { Provider } = SimulatorContext;
|
||||
return (
|
||||
<div className="lc-simulator">
|
||||
{/*progressing.visible ? <PreLoaderView /> : null*/}
|
||||
|
||||
@ -322,7 +322,9 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
||||
'click',
|
||||
(e) => {
|
||||
// fix for popups close logic
|
||||
document.dispatchEvent(new Event('click'));
|
||||
const x = new Event('click');
|
||||
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')) {
|
||||
e.preventDefault();
|
||||
|
||||
@ -163,6 +163,7 @@ export class Field extends Component<FieldProps> {
|
||||
*/
|
||||
function createValueState(valueState?: number, onClear?: (e: React.MouseEvent) => void) {
|
||||
return null;
|
||||
/*
|
||||
let tip: any = null;
|
||||
let className = 'lc-valuestate';
|
||||
let icon: any = null;
|
||||
@ -194,6 +195,7 @@ function createValueState(valueState?: number, onClear?: (e: React.MouseEvent) =
|
||||
{tip && <Tip>{tip}</Tip>}
|
||||
</i>
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
export interface PopupFieldProps extends FieldProps {
|
||||
|
||||
@ -107,6 +107,7 @@ class Renderer extends Component<{ renderer: SimulatorRenderer }> {
|
||||
viewProps.componentId = __id;
|
||||
const leaf = host.document.getNode(__id);
|
||||
viewProps._leaf = leaf;
|
||||
viewProps._componentName = leaf?.componentName;
|
||||
|
||||
return createElement(
|
||||
getDeviceView(Component, device, designMode),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user