mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 10:27:22 +00:00
chore: merge from develop
This commit is contained in:
parent
f831643dc1
commit
f0c3b1f2e5
@ -5,6 +5,7 @@ tags: [FAQ]
|
|||||||
---
|
---
|
||||||
## 简单场景
|
## 简单场景
|
||||||
可以利用 props.__designMode
|
可以利用 props.__designMode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
设计态中,__designMode 值为 "design"
|
设计态中,__designMode 值为 "design"
|
||||||
@ -13,10 +14,12 @@ tags: [FAQ]
|
|||||||
|
|
||||||
## 复杂场景
|
## 复杂场景
|
||||||
在资产包里定义 editUrls
|
在资产包里定义 editUrls
|
||||||
|
|
||||||

|

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

|

|
||||||
|
|
||||||
再执行
|
再执行
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-engine-docs",
|
"name": "@alilc/lowcode-engine-docs",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"description": "低代码引擎版本化文档",
|
"description": "低代码引擎版本化文档",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export class SettingsMain {
|
|||||||
|
|
||||||
private _sessionId = '';
|
private _sessionId = '';
|
||||||
|
|
||||||
@obx.ref private _settings?: SettingTopEntry | null = null;
|
@obx.ref private _settings?: SettingTopEntry;
|
||||||
|
|
||||||
@computed get length(): number | undefined {
|
@computed get length(): number | undefined {
|
||||||
return this._settings?.nodes.length;
|
return this._settings?.nodes.length;
|
||||||
|
|||||||
@ -25,6 +25,25 @@ const releaseVersion = getVersion();
|
|||||||
|
|
||||||
module.exports = ({ context, onGetWebpackConfig }) => {
|
module.exports = ({ context, onGetWebpackConfig }) => {
|
||||||
onGetWebpackConfig((config) => {
|
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
|
config.resolve
|
||||||
.plugin('tsconfigpaths')
|
.plugin('tsconfigpaths')
|
||||||
.use(TsconfigPathsPlugin, [{
|
.use(TsconfigPathsPlugin, [{
|
||||||
|
|||||||
@ -172,7 +172,7 @@ export async function init(
|
|||||||
// 注册一批内置插件
|
// 注册一批内置插件
|
||||||
await plugins.register(OutlinePlugin);
|
await plugins.register(OutlinePlugin);
|
||||||
await plugins.register(componentMetaParser(designer));
|
await plugins.register(componentMetaParser(designer));
|
||||||
await plugins.register(setterRegistry);
|
await plugins.register(setterRegistry, {}, { autoInit: true });
|
||||||
await plugins.register(defaultPanelRegistry(editor, designer));
|
await plugins.register(defaultPanelRegistry(editor, designer));
|
||||||
await plugins.register(builtinHotkey);
|
await plugins.register(builtinHotkey);
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,26 @@ const { version } = lernaConfig;
|
|||||||
|
|
||||||
module.exports = ({ context, onGetWebpackConfig }) => {
|
module.exports = ({ context, onGetWebpackConfig }) => {
|
||||||
onGetWebpackConfig((config) => {
|
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, [
|
config.resolve.plugin('tsconfigpaths').use(TsconfigPathsPlugin, [
|
||||||
{
|
{
|
||||||
configFile: './tsconfig.json',
|
configFile: './tsconfig.json',
|
||||||
|
|||||||
@ -22,5 +22,4 @@ const raxBlockRendererFactory: () => any = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
export default raxBlockRendererFactory;
|
||||||
export default raxBlockRendererFactory;
|
|
||||||
|
|||||||
@ -34,5 +34,4 @@ const raxComponentRendererFactory: () => any = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default raxComponentRendererFactory;
|
export default raxComponentRendererFactory;
|
||||||
|
|||||||
@ -1,5 +1,24 @@
|
|||||||
module.exports = ({ onGetWebpackConfig }) => {
|
module.exports = ({ onGetWebpackConfig }) => {
|
||||||
onGetWebpackConfig((config) => {
|
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);
|
config.performance.hints(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,24 @@
|
|||||||
module.exports = ({ onGetWebpackConfig }) => {
|
module.exports = ({ onGetWebpackConfig }) => {
|
||||||
onGetWebpackConfig((config) => {
|
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);
|
config.performance.hints(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -133,7 +133,7 @@ export class BasicContext {
|
|||||||
// 注册一批内置插件
|
// 注册一批内置插件
|
||||||
this.registerInnerPlugins = async function registerPlugins() {
|
this.registerInnerPlugins = async function registerPlugins() {
|
||||||
await plugins.register(componentMetaParser(designer));
|
await plugins.register(componentMetaParser(designer));
|
||||||
await plugins.register(setterRegistry);
|
await plugins.register(setterRegistry, {}, { autoInit: true });
|
||||||
await plugins.register(defaultPanelRegistry(editor, designer));
|
await plugins.register(defaultPanelRegistry(editor, designer));
|
||||||
await plugins.register(builtinHotkey);
|
await plugins.register(builtinHotkey);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user