Merge branch 'develop' into release/1.3.3-beta

This commit is contained in:
1ncounter 2024-06-18 09:47:25 +08:00
commit 6f69efcab0
10 changed files with 57 additions and 20 deletions

View File

@ -11,8 +11,9 @@ sidebar_position: 10
![image.png](https://img.alicdn.com/imgextra/i4/O1CN01eVA0U41xYRP3e5zo0_!!6000000006455-2-tps-1780-996.png)
页面上可以扩展的区域共 5 个,具体如下:
![image.png](https://img.alicdn.com/imgextra/i3/O1CN014d2AcS1D5c9TshEiQ_!!6000000000165-2-tps-1892-974.png)
页面上可以扩展的区域共 6 个,具体如下:
![image](https://github.com/alibaba/lowcode-engine/assets/11935995/ba4641dd-d346-4ef7-8b71-8ca211e6eaf4)
### 基本概念
#### 扩展区域位置 (area)
##### topArea
@ -41,6 +42,11 @@ sidebar_position: 10
##### rightArea
右侧区域,常用于组件的配置。常见的扩展有:统一处理组件的配置项,例如统一删除某一个配置项,统一添加某一个配置项的。
##### bottomArea
底部扩展区域。
##### toolbar
跟 topArea 类似,按需放置面板插件~

View File

@ -43,5 +43,5 @@ sidebar_position: 3
| @alilc/lowcode-materials | [https://github.com/alibaba/lowcode-materials](https://github.com/alibaba/lowcode-materials) | packages/fusion-lowcode-materials |
| @alilc/antd-lowcode-materials | [https://github.com/alibaba/lowcode-materials](https://github.com/alibaba/lowcode-materials) | packages/antd-lowcode-materials |
| @alifd/layout(原 @alifd/pro-layout 升级后的版本) | [https://github.com/alibaba-fusion/layout](https://github.com/alibaba-fusion/layout) | |
| | | |
| @alilc/lowcode-engine-docs | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | docs |
| | | |

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-engine-docs",
"version": "1.2.35",
"version": "1.2.36",
"description": "低代码引擎版本化文档",
"license": "MIT",
"files": [

View File

@ -160,15 +160,20 @@ lowcode-engine 启动后,提供了几个 umd 文件,可以结合 [lowcode-de
## 🤝 参与共建
请先阅读:
1. [如何配置引擎调试环境?](https://lowcode-engine.cn/site/docs/participate/prepare)
1. [如何配置引擎调试环境?](https://lowcode-engine.cn/site/docs/participate)
2. [关于引擎的研发协作流程](https://lowcode-engine.cn/site/docs/participate/flow)
3. [引擎的工程化配置](https://lowcode-engine.cn/site/docs/participate/config)
> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html)、[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。(此段参考 [antd](https://github.com/ant-design/ant-design)
关于提交 PR
请将目标合并分支设置为 **develop**,不要指定 **main** 分支在发布正式版本后develop 分支将会合入 main 分支。
## ⭐️ Star 历史
<a href="https://star-history.com/#alibaba/lowcode-engine">
<img src="https://api.star-history.com/svg?repos=alibaba/lowcode-engine&type=Date" alt="Star History Chart" width="100%" />
</a>
## ❤️ 致谢
感谢所有为引擎项目贡献力量的同学们~

View File

@ -160,9 +160,8 @@ After lowcode-engine is started, several umd files are provided, which can be de
## 🤝 Participation
Please read first:
1. [How to configure the engine debugging environment? ](https://lowcode-engine.cn/site/docs/participate/prepare)
1. [How to configure the engine debugging environment? ](https://lowcode-engine.cn/site/docs/participate)
2. [About the R&D collaboration process of the engine](https://lowcode-engine.cn/site/docs/participate/flow)
3. [Engineering Configuration of Engine](https://lowcode-engine.cn/site/docs/participate/config)
> Strongly recommend reading ["The Wisdom of Asking Questions"](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way), ["How to Ask Questions to the Open Source Community"](https: //github.com/seajs/seajs/issues/545) and [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html), [ "How to Submit Unanswerable Questions to Open Source Projects"](https://zhuanlan.zhihu.com/p/25795393), better questions are easier to get help. (This paragraph refers to [antd](https://github.com/ant-design/ant-design))

View File

@ -37,6 +37,8 @@ enum EVENT_NAMES {
expandableChanged = 'expandableChanged',
conditionChanged = 'conditionChanged',
loopChanged = 'loopChanged',
}
export default class TreeNode {
@ -160,6 +162,10 @@ export default class TreeNode {
return this.node.hasCondition() && !this.node.conditionGroup;
}
get loop(): boolean {
return this.node.hasLoop();
}
get children(): TreeNode[] | null {
return this.node.children?.map((node) => this.tree.getTreeNode(node)) || null;
}
@ -222,6 +228,14 @@ export default class TreeNode {
};
}
onLoopChanged(fn: (treeNode: TreeNode) => void): IPublicTypeDisposable {
this.event.on(EVENT_NAMES.loopChanged, fn);
return () => {
this.event.off(EVENT_NAMES.loopChanged, fn);
};
}
onExpandableChanged(fn: (expandable: boolean) => void): IPublicTypeDisposable {
this.event.on(EVENT_NAMES.expandableChanged, fn);
return () => {
@ -244,6 +258,10 @@ export default class TreeNode {
this.event.emit(EVENT_NAMES.conditionChanged, this.condition);
}
notifyLoopChanged(): void {
this.event.emit(EVENT_NAMES.loopChanged, this.loop);
}
setHidden(flag: boolean) {
if (this.node.conditionGroup) {
return;

View File

@ -36,12 +36,13 @@ export class Tree {
doc?.onChangeNodeProp((info: IPublicTypePropChangeOptions) => {
const { node, key } = info;
const treeNode = this.getTreeNodeById(node.id);
if (key === '___title___') {
const treeNode = this.getTreeNodeById(node.id);
treeNode?.notifyTitleLabelChanged();
} else if (key === '___condition___') {
const treeNode = this.getTreeNodeById(node.id);
treeNode?.notifyConditionChanged();
} else if (key === '___loop___') {
treeNode?.notifyLoopChanged();
}
});

View File

@ -28,6 +28,7 @@ export default class TreeTitle extends PureComponent<{
editing: boolean;
title: string;
condition?: boolean;
loop?: boolean;
visible?: boolean;
filterWorking: boolean;
keywords: string;
@ -89,6 +90,7 @@ export default class TreeTitle extends PureComponent<{
editing: false,
title: treeNode.titleLabel,
condition: treeNode.condition,
loop: treeNode.loop,
visible: !treeNode.hidden,
});
treeNode.onTitleLabelChanged(() => {
@ -101,6 +103,11 @@ export default class TreeTitle extends PureComponent<{
condition: treeNode.condition,
});
});
treeNode.onLoopChanged(() => {
this.setState({
loop: treeNode.loop,
});
});
treeNode.onHiddenChanged((hidden: boolean) => {
this.setState({
visible: !hidden,
@ -207,7 +214,7 @@ export default class TreeTitle extends PureComponent<{
<Tip>{intlNode('Slot for {prop}', { prop: node.slotFor.key })}</Tip>
</a>
)}
{node.hasLoop() && (
{this.state.loop && (
<a className="tree-node-tag loop">
{/* todo: click todo something */}
<IconLoop />

View File

@ -259,10 +259,11 @@ exports[`Base Render renderComp 1`] = `
"hidden": undefined,
}
}
aria-expanded="false"
aria-label="select"
autoComplete="off"
disabled={false}
height="100%"
maxLength={null}
onBlur={[Function]}
onChange={[Function]}
onCompositionEnd={[Function]}
@ -378,10 +379,11 @@ exports[`Base Render renderComp 1`] = `
"hidden": undefined,
}
}
aria-expanded="false"
aria-label="select"
autoComplete="off"
disabled={false}
height="100%"
maxLength={null}
onBlur={[Function]}
onChange={[Function]}
onCompositionEnd={[Function]}
@ -485,7 +487,6 @@ exports[`Base Render renderComp 1`] = `
autoComplete="off"
disabled={false}
height="100%"
maxLength={null}
onBlur={[Function]}
onChange={[Function]}
onCompositionEnd={[Function]}
@ -988,7 +989,6 @@ exports[`Base Render renderComp 1`] = `
autoComplete="off"
disabled={false}
height="100%"
maxLength={null}
onBlur={[Function]}
onChange={[Function]}
onCompositionEnd={[Function]}
@ -1048,10 +1048,11 @@ exports[`Base Render renderComp 1`] = `
"hidden": undefined,
}
}
aria-expanded="false"
aria-label="select"
autoComplete="off"
disabled={false}
height="100%"
maxLength={null}
name="error"
onBlur={[Function]}
onChange={[Function]}

View File

@ -19,7 +19,7 @@ export class CommonUI implements IPublicApiCommonUI {
Card = Card;
Checkbox = Checkbox;
DatePicker = DatePicker;
Dialog = Dialog;
Dialog = Dialog as any;
Dropdown = Dropdown;
Form = Form;
Icon = Icon;
@ -31,15 +31,15 @@ export class CommonUI implements IPublicApiCommonUI {
Radio = Radio;
Search = Search;
Select = Select;
SplitButton = SplitButton;
SplitButton = SplitButton as any;
Step = Step;
Switch = Switch;
Switch = Switch as any;
Tab = Tab;
Table = Table;
Tree = Tree;
TreeSelect = TreeSelect;
Upload = Upload;
Divider = Divider;
Divider = Divider as any;
ContextMenu: ((props: {
menus: IPublicTypeContextMenuAction[];