Skip to content

Commit

Permalink
chore: merge from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JackLian committed Dec 22, 2022
1 parent f831643 commit f0c3b1f
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 7 deletions.
3 changes: 3 additions & 0 deletions docs/docs/faq/faq011.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags: [FAQ]
---
## 简单场景
可以利用 props.__designMode

![image.png](https://img.alicdn.com/imgextra/i3/O1CN01btr66024FOEldBOr2_!!6000000007361-2-tps-1616-440.png)

设计态中,__designMode 值为 "design"
Expand All @@ -13,10 +14,12 @@ tags: [FAQ]

## 复杂场景
在资产包里定义 editUrls

![image.png](https://img.alicdn.com/imgextra/i1/O1CN01odal6P27Rhjn8NoJ6_!!6000000007794-2-tps-1590-538.png)

### editUrls
在 lowcode/xx/ 下新建一个 view.tsx

![image.png](https://img.alicdn.com/imgextra/i3/O1CN01q0Bbn91Lrig7d0alA_!!6000000001353-2-tps-598-154.png)

再执行
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-engine-docs",
"version": "1.0.9",
"version": "1.0.10",
"description": "低代码引擎版本化文档",
"license": "MIT",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-skeleton/src/components/settings/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class SettingsMain {

private _sessionId = '';

@obx.ref private _settings?: SettingTopEntry | null = null;
@obx.ref private _settings?: SettingTopEntry;

@computed get length(): number | undefined {
return this._settings?.nodes.length;
Expand Down
19 changes: 19 additions & 0 deletions packages/engine/build.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ const releaseVersion = getVersion();

module.exports = ({ context, onGetWebpackConfig }) => {
onGetWebpackConfig((config) => {
['jsx', 'tsx'].forEach((rule) => {
config.module
.rule(rule)
.exclude.clear()
.add(/node_modules(?!(.+_component_demo|.+build-plugin-component))/)
.end()
.use('babel-loader')
.tap((options) => {
const { plugins = [] } = options;
console.log('plugins', plugins);
return {
...options,
plugins: [
...plugins,
['@babel/plugin-proposal-class-properties', { loose: true }],
],
};
});
});
config.resolve
.plugin('tsconfigpaths')
.use(TsconfigPathsPlugin, [{
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/engine-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export async function init(
// 注册一批内置插件
await plugins.register(OutlinePlugin);
await plugins.register(componentMetaParser(designer));
await plugins.register(setterRegistry);
await plugins.register(setterRegistry, {}, { autoInit: true });
await plugins.register(defaultPanelRegistry(editor, designer));
await plugins.register(builtinHotkey);

Expand Down
20 changes: 20 additions & 0 deletions packages/ignitor/build.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ const { version } = lernaConfig;

module.exports = ({ context, onGetWebpackConfig }) => {
onGetWebpackConfig((config) => {
['jsx', 'tsx'].forEach((rule) => {
config.module
.rule(rule)
.exclude.clear()
.add(/node_modules(?!(.+_component_demo|.+build-plugin-component))/)
.end()
.use('babel-loader')
.tap((options) => {
const { plugins = [] } = options;
console.log('plugins', plugins);
return {
...options,
plugins: [
...plugins,
['@babel/plugin-proposal-class-properties', { loose: true }],
],
};
});
});

config.resolve.plugin('tsconfigpaths').use(TsconfigPathsPlugin, [
{
configFile: './tsconfig.json',
Expand Down
3 changes: 1 addition & 2 deletions packages/rax-renderer/src/renderer/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ const raxBlockRendererFactory: () => any = () => {
}
};
};

export default raxBlockRendererFactory;
export default raxBlockRendererFactory;
1 change: 0 additions & 1 deletion packages/rax-renderer/src/renderer/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ const raxComponentRendererFactory: () => any = () => {
}
};
};

export default raxComponentRendererFactory;
19 changes: 19 additions & 0 deletions packages/rax-simulator-renderer/build.plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
module.exports = ({ onGetWebpackConfig }) => {
onGetWebpackConfig((config) => {
['jsx', 'tsx'].forEach((rule) => {
config.module
.rule(rule)
.exclude.clear()
.add(/node_modules(?!(.+_component_demo|.+build-plugin-component))/)
.end()
.use('babel-loader')
.tap((options) => {
const { plugins = [] } = options;
console.log('plugins', plugins);
return {
...options,
plugins: [
...plugins,
['@babel/plugin-proposal-class-properties', { loose: true }],
],
};
});
});
config.performance.hints(false);
});
};
19 changes: 19 additions & 0 deletions packages/react-simulator-renderer/build.plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
module.exports = ({ onGetWebpackConfig }) => {
onGetWebpackConfig((config) => {
['jsx', 'tsx'].forEach((rule) => {
config.module
.rule(rule)
.exclude.clear()
.add(/node_modules(?!(.+_component_demo|.+build-plugin-component))/)
.end()
.use('babel-loader')
.tap((options) => {
const { plugins = [] } = options;
console.log('plugins', plugins);
return {
...options,
plugins: [
...plugins,
['@babel/plugin-proposal-class-properties', { loose: true }],
],
};
});
});
config.performance.hints(false);
});
};
2 changes: 1 addition & 1 deletion packages/workspace/src/base-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class BasicContext {
// 注册一批内置插件
this.registerInnerPlugins = async function registerPlugins() {
await plugins.register(componentMetaParser(designer));
await plugins.register(setterRegistry);
await plugins.register(setterRegistry, {}, { autoInit: true });
await plugins.register(defaultPanelRegistry(editor, designer));
await plugins.register(builtinHotkey);
};
Expand Down

0 comments on commit f0c3b1f

Please sign in to comment.