mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-14 21:12:53 +00:00
Merge remote-tracking branch 'origin/develop' into release/1.3.0-beta
This commit is contained in:
commit
b484032169
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -5,4 +5,4 @@
|
|||||||
* @liujuping @JackLian
|
* @liujuping @JackLian
|
||||||
|
|
||||||
/modules/material-parser @akirakai
|
/modules/material-parser @akirakai
|
||||||
/modules/code-generator @leoyuan
|
/modules/code-generator @qingniaotonghua
|
||||||
|
|||||||
@ -40,99 +40,99 @@ CommonUI API 是一个专为低代码引擎设计的组件 UI 库,使用它开
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|------------|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|----------------------------------------|
|
|------------|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|----------------------------------------|
|
||||||
| name | 动作的唯一标识符<br>Unique identifier for the action | string | |
|
| name | 动作的唯一标识符<br/>Unique identifier for the action | string | |
|
||||||
| title | 显示的标题,可以是字符串或国际化数据<br>Display title, can be a string or internationalized data | string \| IPublicTypeI18nData (optional) | |
|
| title | 显示的标题,可以是字符串或国际化数据<br/>Display title, can be a string or internationalized data | string \| IPublicTypeI18nData (optional) | |
|
||||||
| type | 菜单项类型<br>Menu item type | IPublicEnumContextMenuType (optional) | IPublicEnumPContextMenuType.MENU_ITEM |
|
| type | 菜单项类型<br/>Menu item type | IPublicEnumContextMenuType (optional) | IPublicEnumPContextMenuType.MENU_ITEM |
|
||||||
| action | 点击时执行的动作,可选<br>Action to execute on click, optional | (nodes: IPublicModelNode[]) => void (optional) | |
|
| action | 点击时执行的动作,可选<br/>Action to execute on click, optional | (nodes: IPublicModelNode[]) => void (optional) | |
|
||||||
| items | 子菜单项或生成子节点的函数,可选,仅支持两级<br>Sub-menu items or function to generate child node, optional | Omit<IPublicTypeContextMenuAction, 'items'>[] \| ((nodes: IPublicModelNode[]) => Omit<IPublicTypeContextMenuAction, 'items'>[]) (optional) | |
|
| items | 子菜单项或生成子节点的函数,可选,仅支持两级<br/>Sub-menu items or function to generate child node, optional | Omit<IPublicTypeContextMenuAction, 'items'>[] \| ((nodes: IPublicModelNode[]) => Omit<IPublicTypeContextMenuAction, 'items'>[]) (optional) | |
|
||||||
| condition | 显示条件函数<br>Function to determine display condition | (nodes: IPublicModelNode[]) => boolean (optional) | |
|
| condition | 显示条件函数<br/>Function to determine display condition | (nodes: IPublicModelNode[]) => boolean (optional) | |
|
||||||
| disabled | 禁用条件函数,可选<br>Function to determine disabled condition, optional | (nodes: IPublicModelNode[]) => boolean (optional) | |
|
| disabled | 禁用条件函数,可选<br/>Function to determine disabled condition, optional | (nodes: IPublicModelNode[]) => boolean (optional) | |
|
||||||
|
|
||||||
|
|
||||||
### Balloon
|
### Balloon
|
||||||
详细文档: [Balloon Documentation](https://fusion.design/pc/component/balloon)
|
详细文档: [Balloon Documentation](https://fusion.design/pc/component/balloon)
|
||||||
|
|
||||||
### Breadcrumb
|
### Breadcrumb
|
||||||
详细文档: [Breadcrumb Documentation](https://fusion.design/pc/component/breadcrumb)
|
详细文档: [Breadcrumb Documentation](https://fusion.design/pc/component/breadcrumb)
|
||||||
|
|
||||||
### Button
|
### Button
|
||||||
详细文档: [Button Documentation](https://fusion.design/pc/component/button)
|
详细文档: [Button Documentation](https://fusion.design/pc/component/button)
|
||||||
|
|
||||||
### Card
|
### Card
|
||||||
详细文档: [Card Documentation](https://fusion.design/pc/component/card)
|
详细文档:[Card Documentation](https://fusion.design/pc/component/card)
|
||||||
|
|
||||||
### Checkbox
|
### Checkbox
|
||||||
详细文档: [Checkbox Documentation](https://fusion.design/pc/component/checkbox)
|
详细文档:[Checkbox Documentation](https://fusion.design/pc/component/checkbox)
|
||||||
|
|
||||||
### DatePicker
|
### DatePicker
|
||||||
详细文档: [DatePicker Documentation](https://fusion.design/pc/component/datepicker)
|
详细文档:[DatePicker Documentation](https://fusion.design/pc/component/datepicker)
|
||||||
|
|
||||||
### Dialog
|
### Dialog
|
||||||
详细文档: [Dialog Documentation](https://fusion.design/pc/component/dialog)
|
详细文档:[Dialog Documentation](https://fusion.design/pc/component/dialog)
|
||||||
|
|
||||||
### Dropdown
|
### Dropdown
|
||||||
详细文档: [Dropdown Documentation](https://fusion.design/pc/component/dropdown)
|
详细文档:[Dropdown Documentation](https://fusion.design/pc/component/dropdown)
|
||||||
|
|
||||||
### Form
|
### Form
|
||||||
详细文档: [Form Documentation](https://fusion.design/pc/component/form)
|
详细文档:[Form Documentation](https://fusion.design/pc/component/form)
|
||||||
|
|
||||||
### Icon
|
### Icon
|
||||||
详细文档: [Icon Documentation](https://fusion.design/pc/component/icon)
|
详细文档:[Icon Documentation](https://fusion.design/pc/component/icon)
|
||||||
|
|
||||||
引擎默认主题支持的 icon 列表:https://fusion.design/64063/component/icon?themeid=20133
|
引擎默认主题支持的 icon 列表:https://fusion.design/64063/component/icon?themeid=20133
|
||||||
|
|
||||||
|
|
||||||
### Input
|
### Input
|
||||||
详细文档: [Input Documentation](https://fusion.design/pc/component/input)
|
详细文档:[Input Documentation](https://fusion.design/pc/component/input)
|
||||||
|
|
||||||
### Loading
|
### Loading
|
||||||
详细文档: [Loading Documentation](https://fusion.design/pc/component/loading)
|
详细文档:[Loading Documentation](https://fusion.design/pc/component/loading)
|
||||||
|
|
||||||
### Message
|
### Message
|
||||||
详细文档: [Message Documentation](https://fusion.design/pc/component/message)
|
详细文档:[Message Documentation](https://fusion.design/pc/component/message)
|
||||||
|
|
||||||
### Overlay
|
### Overlay
|
||||||
详细文档: [Overlay Documentation](https://fusion.design/pc/component/overlay)
|
详细文档:[Overlay Documentation](https://fusion.design/pc/component/overlay)
|
||||||
|
|
||||||
### Pagination
|
### Pagination
|
||||||
详细文档: [Pagination Documentation](https://fusion.design/pc/component/pagination)
|
详细文档:[Pagination Documentation](https://fusion.design/pc/component/pagination)
|
||||||
|
|
||||||
### Radio
|
### Radio
|
||||||
详细文档: [Radio Documentation](https://fusion.design/pc/component/radio)
|
详细文档:[Radio Documentation](https://fusion.design/pc/component/radio)
|
||||||
|
|
||||||
### Search
|
### Search
|
||||||
详细文档: [Search Documentation](https://fusion.design/pc/component/search)
|
详细文档:[Search Documentation](https://fusion.design/pc/component/search)
|
||||||
|
|
||||||
### Select
|
### Select
|
||||||
详细文档: [Select Documentation](https://fusion.design/pc/component/select)
|
详细文档:[Select Documentation](https://fusion.design/pc/component/select)
|
||||||
|
|
||||||
### SplitButton
|
### SplitButton
|
||||||
详细文档: [SplitButton Documentation](https://fusion.design/pc/component/splitbutton)
|
详细文档:[SplitButton Documentation](https://fusion.design/pc/component/splitbutton)
|
||||||
|
|
||||||
### Step
|
### Step
|
||||||
详细文档: [Step Documentation](https://fusion.design/pc/component/step)
|
详细文档:[Step Documentation](https://fusion.design/pc/component/step)
|
||||||
|
|
||||||
### Switch
|
### Switch
|
||||||
详细文档: [Switch Documentation](https://fusion.design/pc/component/switch)
|
详细文档:[Switch Documentation](https://fusion.design/pc/component/switch)
|
||||||
|
|
||||||
### Tab
|
### Tab
|
||||||
详细文档: [Tab Documentation](https://fusion.design/pc/component/tab)
|
详细文档:[Tab Documentation](https://fusion.design/pc/component/tab)
|
||||||
|
|
||||||
### Table
|
### Table
|
||||||
详细文档: [Table Documentation](https://fusion.design/pc/component/table)
|
详细文档:[Table Documentation](https://fusion.design/pc/component/table)
|
||||||
|
|
||||||
### Tree
|
### Tree
|
||||||
详细文档: [Tree Documentation](https://fusion.design/pc/component/tree)
|
详细文档:[Tree Documentation](https://fusion.design/pc/component/tree)
|
||||||
|
|
||||||
### TreeSelect
|
### TreeSelect
|
||||||
详细文档: [TreeSelect Documentation](https://fusion.design/pc/component/treeselect)
|
详细文档:[TreeSelect Documentation](https://fusion.design/pc/component/treeselect)
|
||||||
|
|
||||||
### Upload
|
### Upload
|
||||||
详细文档: [Upload Documentation](https://fusion.design/pc/component/upload)
|
详细文档:[Upload Documentation](https://fusion.design/pc/component/upload)
|
||||||
|
|
||||||
### Divider
|
### Divider
|
||||||
详细文档: [Divider Documentation](https://fusion.design/pc/component/divider)
|
详细文档:[Divider Documentation](https://fusion.design/pc/component/divider)
|
||||||
|
|
||||||
## 说明
|
## 说明
|
||||||
|
|
||||||
如果需要其他组件,可以提issue给我们
|
如果需要其他组件,可以提 issue 给我们。
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-engine-docs",
|
"name": "@alilc/lowcode-engine-docs",
|
||||||
"version": "1.2.19",
|
"version": "1.2.21",
|
||||||
"description": "低代码引擎版本化文档",
|
"description": "低代码引擎版本化文档",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@ -17,6 +17,8 @@ export interface IContextMenuActions {
|
|||||||
adjustMenuLayout: IPublicApiMaterial['adjustContextMenuLayout'];
|
adjustMenuLayout: IPublicApiMaterial['adjustContextMenuLayout'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let destroyFn: Function | undefined;
|
||||||
|
|
||||||
export class ContextMenuActions implements IContextMenuActions {
|
export class ContextMenuActions implements IContextMenuActions {
|
||||||
actions: IPublicTypeContextMenuAction[] = [];
|
actions: IPublicTypeContextMenuAction[] = [];
|
||||||
|
|
||||||
@ -55,7 +57,7 @@ export class ContextMenuActions implements IContextMenuActions {
|
|||||||
const { bounds } = designer.project.simulator?.viewport || { bounds: { left: 0, top: 0 } };
|
const { bounds } = designer.project.simulator?.viewport || { bounds: { left: 0, top: 0 } };
|
||||||
const { left: simulatorLeft, top: simulatorTop } = bounds;
|
const { left: simulatorLeft, top: simulatorTop } = bounds;
|
||||||
|
|
||||||
let destroyFn: Function | undefined;
|
destroyFn?.();
|
||||||
|
|
||||||
const destroy = () => {
|
const destroy = () => {
|
||||||
destroyFn?.();
|
destroyFn?.();
|
||||||
|
|||||||
@ -87,6 +87,9 @@ export const defaultContextMenu = (ctx: IPublicModelPluginContext) => {
|
|||||||
material.addContextMenuOption({
|
material.addContextMenuOption({
|
||||||
name: 'copy',
|
name: 'copy',
|
||||||
title: intl('Copy.1'),
|
title: intl('Copy.1'),
|
||||||
|
condition(nodes) {
|
||||||
|
return nodes.length > 0;
|
||||||
|
},
|
||||||
action(nodes) {
|
action(nodes) {
|
||||||
if (!nodes || nodes.length < 1) {
|
if (!nodes || nodes.length < 1) {
|
||||||
return;
|
return;
|
||||||
@ -159,6 +162,9 @@ export const defaultContextMenu = (ctx: IPublicModelPluginContext) => {
|
|||||||
material.addContextMenuOption({
|
material.addContextMenuOption({
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
title: intl('Delete'),
|
title: intl('Delete'),
|
||||||
|
condition(nodes) {
|
||||||
|
return nodes.length > 0;
|
||||||
|
},
|
||||||
action(nodes) {
|
action(nodes) {
|
||||||
nodes.forEach((node) => {
|
nodes.forEach((node) => {
|
||||||
node.remove();
|
node.remove();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.context-menu-tree-wrap {
|
.context-menu-tree-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 4px 10px 4px 24px;
|
padding: 4px 10px 4px 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.context-menu-tree-children {
|
.context-menu-tree-children {
|
||||||
|
|||||||
@ -22,16 +22,8 @@ const Tree = (props: {
|
|||||||
const { node } = props;
|
const { node } = props;
|
||||||
|
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!node.parent) {
|
|
||||||
return (
|
return (
|
||||||
<div className="context-menu-tree-wrap">
|
<div className="context-menu-tree-wrap">{ props.children }</div>
|
||||||
<div className="context-menu-tree-children">
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user