mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 05:48:17 +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() {
|
private async setupAssets() {
|
||||||
const { editor } = this.props;
|
const { editor } = this.props;
|
||||||
const assets = await editor.onceGot('assets');
|
try {
|
||||||
if (!this._mounted) {
|
const assets = await editor.onceGot('assets');
|
||||||
return;
|
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() {
|
componentWillUnmount() {
|
||||||
this._mounted = false;
|
this._mounted = false;
|
||||||
|
|||||||
@ -3,3 +3,5 @@
|
|||||||
lerna run build --stream
|
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-general/dist
|
||||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-vision/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