mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
Merge branch 'feat/rax-simulator' into release/0.9.0
This commit is contained in:
commit
26f5cba13c
@ -31,18 +31,24 @@ export default class DesignerPlugin extends PureComponent<PluginProps, DesignerP
|
||||
|
||||
private async setupAssets() {
|
||||
const { editor } = this.props;
|
||||
const assets = await editor.onceGot('assets');
|
||||
if (!this._mounted) {
|
||||
return;
|
||||
try {
|
||||
const assets = await editor.onceGot('assets');
|
||||
const renderEnv = await editor.get('renderEnv');
|
||||
if (!this._mounted) {
|
||||
return;
|
||||
}
|
||||
const { components, packages, extraEnvironment } = assets;
|
||||
const state = {
|
||||
componentMetadatas: components || [],
|
||||
library: packages || [],
|
||||
extraEnvironment,
|
||||
renderEnv,
|
||||
};
|
||||
this.setState(state);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
const { components, packages, extraEnvironment } = assets;
|
||||
const state = {
|
||||
componentMetadatas: components || [],
|
||||
library: packages || [],
|
||||
extraEnvironment,
|
||||
};
|
||||
this.setState(state);
|
||||
};
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this._mounted = false;
|
||||
|
||||
@ -3,3 +3,5 @@
|
||||
lerna run build --stream
|
||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-general/dist
|
||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-vision/dist
|
||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-general/dist
|
||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-vision/dist
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user