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