Skip to content

Commit

Permalink
feat(config): add onGot in config.device
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping authored and JackLian committed Aug 18, 2023
1 parent 8b5e2b4 commit 9ddda1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/plugin-designer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export default class DesignerPlugin extends PureComponent<PluginProps, DesignerP
requestHandlersMap,
});
});
engineConfig.onGot('device', (device) => {
this.setState({
device,
});
});
const { components, packages, extraEnvironment, utils } = assets;
const state = {
componentMetadatas: components || [],
Expand Down

0 comments on commit 9ddda1d

Please sign in to comment.