mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
fix: 提前 simulator mount 的时间点, 修复极低概率出现的 style 丢失现象
This commit is contained in:
parent
ca4222a98e
commit
b65460f029
@ -23,9 +23,10 @@ export class BuiltinSimulatorHostView extends Component<SimulatorHostProps> {
|
||||
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
const { project } = this.props;
|
||||
const { project, onMount } = this.props;
|
||||
this.host = (project.simulator as BuiltinSimulatorHost) || new BuiltinSimulatorHost(project);
|
||||
this.host.setProps(this.props);
|
||||
onMount?.(this.host);
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps: BuiltinSimulatorProps) {
|
||||
@ -33,12 +34,6 @@ export class BuiltinSimulatorHostView extends Component<SimulatorHostProps> {
|
||||
return false;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.onMount) {
|
||||
this.props.onMount(this.host);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="lc-simulator">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user