diff --git a/docs/docs/api/skeleton.md b/docs/docs/api/skeleton.md index 396fad9e9..3ae0e3524 100644 --- a/docs/docs/api/skeleton.md +++ b/docs/docs/api/skeleton.md @@ -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 类似,按需放置面板插件~ diff --git a/docs/docs/guide/appendix/npms.md b/docs/docs/guide/appendix/npms.md index b0292c273..257e6b126 100644 --- a/docs/docs/guide/appendix/npms.md +++ b/docs/docs/guide/appendix/npms.md @@ -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 | | | | | diff --git a/docs/package.json b/docs/package.json index 7c644de33..f6b649506 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@alilc/lowcode-engine-docs", - "version": "1.2.35", + "version": "1.2.36", "description": "低代码引擎版本化文档", "license": "MIT", "files": [ diff --git a/packages/engine/README-zh_CN.md b/packages/engine/README-zh_CN.md index 5442aa58b..f45f48f5e 100644 --- a/packages/engine/README-zh_CN.md +++ b/packages/engine/README-zh_CN.md @@ -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 历史 + + + Star History Chart + + ## ❤️ 致谢 感谢所有为引擎项目贡献力量的同学们~ diff --git a/packages/engine/README.md b/packages/engine/README.md index ae4e7fd43..82d855236 100644 --- a/packages/engine/README.md +++ b/packages/engine/README.md @@ -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)) diff --git a/packages/plugin-outline-pane/src/controllers/tree-node.ts b/packages/plugin-outline-pane/src/controllers/tree-node.ts index 34d06fee0..1526e2a59 100644 --- a/packages/plugin-outline-pane/src/controllers/tree-node.ts +++ b/packages/plugin-outline-pane/src/controllers/tree-node.ts @@ -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; diff --git a/packages/plugin-outline-pane/src/controllers/tree.ts b/packages/plugin-outline-pane/src/controllers/tree.ts index ca5a43c55..7e75307a0 100644 --- a/packages/plugin-outline-pane/src/controllers/tree.ts +++ b/packages/plugin-outline-pane/src/controllers/tree.ts @@ -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(); } }); diff --git a/packages/plugin-outline-pane/src/views/tree-title.tsx b/packages/plugin-outline-pane/src/views/tree-title.tsx index f822bd644..d7e29dbe8 100644 --- a/packages/plugin-outline-pane/src/views/tree-title.tsx +++ b/packages/plugin-outline-pane/src/views/tree-title.tsx @@ -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<{ {intlNode('Slot for {prop}', { prop: node.slotFor.key })} )} - {node.hasLoop() && ( + {this.state.loop && ( {/* todo: click todo something */} diff --git a/packages/renderer-core/tests/renderer/__snapshots__/renderer.test.tsx.snap b/packages/renderer-core/tests/renderer/__snapshots__/renderer.test.tsx.snap index 79c5f0f08..4a55c6cd4 100644 --- a/packages/renderer-core/tests/renderer/__snapshots__/renderer.test.tsx.snap +++ b/packages/renderer-core/tests/renderer/__snapshots__/renderer.test.tsx.snap @@ -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]} diff --git a/packages/shell/src/api/commonUI.tsx b/packages/shell/src/api/commonUI.tsx index 69dd104b2..753c24cbe 100644 --- a/packages/shell/src/api/commonUI.tsx +++ b/packages/shell/src/api/commonUI.tsx @@ -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[];