mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-05 17:57:13 +00:00
Merge branch 'develop' into release/1.0.15-beta
This commit is contained in:
commit
c0bb4dd822
@ -36,6 +36,10 @@ type PropChangeOptions = {
|
|||||||
oldValue: any;
|
oldValue: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const Events = {
|
||||||
|
IMPORT_SCHEMA: 'shell.document.importSchema',
|
||||||
|
};
|
||||||
|
|
||||||
export default class DocumentModel {
|
export default class DocumentModel {
|
||||||
private readonly [documentSymbol]: InnerDocumentModel;
|
private readonly [documentSymbol]: InnerDocumentModel;
|
||||||
private readonly [editorSymbol]: Editor;
|
private readonly [editorSymbol]: Editor;
|
||||||
@ -135,6 +139,7 @@ export default class DocumentModel {
|
|||||||
*/
|
*/
|
||||||
importSchema(schema: RootSchema) {
|
importSchema(schema: RootSchema) {
|
||||||
this[documentSymbol].import(schema);
|
this[documentSymbol].import(schema);
|
||||||
|
this[editorSymbol].emit(Events.IMPORT_SCHEMA, schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -290,4 +295,12 @@ export default class DocumentModel {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* import schema event
|
||||||
|
* @param fn
|
||||||
|
*/
|
||||||
|
onImportSchema(fn: (schema: RootSchema) => void) {
|
||||||
|
this[editorSymbol].on(Events.IMPORT_SCHEMA, fn as any);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -882,7 +882,7 @@ props 数组下对象字段描述:
|
|||||||
| isNullNode(AAA) | 是否存在渲染的根节点 | Boolean |
|
| isNullNode(AAA) | 是否存在渲染的根节点 | Boolean |
|
||||||
| isLayout(AAA) | 是否是layout布局组件 | Boolean |
|
| isLayout(AAA) | 是否是layout布局组件 | Boolean |
|
||||||
| rootSelector(AAA) | 组件选中框的 cssSelector | String |
|
| rootSelector(AAA) | 组件选中框的 cssSelector | String |
|
||||||
| disableBehaviors(AAA) | 用于屏蔽在设计器中选中组件时提供的操作项,默认操作项有 copy、move、remove | String[] |
|
| disableBehaviors(AAA) | 用于屏蔽在设计器中选中组件时提供的操作项,默认操作项有 copy、hide、remove | String[] |
|
||||||
| actions(AAA) | 用于详细配置上述操作项的内容 | Object |
|
| actions(AAA) | 用于详细配置上述操作项的内容 | Object |
|
||||||
| isMinimalRenderUnit | 是否是最小渲染单元,最小渲染单元下的组件渲染和更新都从单元的根节点开始渲染和更新。如果嵌套了多层最小渲染单元,渲染会从最外层的最小渲染单元开始渲染。 | Boolean |
|
| isMinimalRenderUnit | 是否是最小渲染单元,最小渲染单元下的组件渲染和更新都从单元的根节点开始渲染和更新。如果嵌套了多层最小渲染单元,渲染会从最外层的最小渲染单元开始渲染。 | Boolean |
|
||||||
|
|
||||||
@ -890,26 +890,26 @@ props 数组下对象字段描述:
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
"configure": {
|
configure: {
|
||||||
"component": {
|
component: {
|
||||||
"isContainer": true,
|
isContainer: true,
|
||||||
"isModal": false,
|
isModal: false,
|
||||||
"descriptor": "title",
|
descriptor: 'title',
|
||||||
"nestingRule": {
|
nestingRule: {
|
||||||
"childWhitelist": [ "SelectOption" ],
|
childWhitelist: ['SelectOption'],
|
||||||
"parentWhitelist": [ "Select", "Table" ]
|
parentWhitelist: ['Select', 'Table'],
|
||||||
},
|
},
|
||||||
rootSelector: '.next-dialog',
|
rootSelector: '.next-dialog',
|
||||||
disableBehaviors: [ 'copy', 'remove' ],
|
disableBehaviors: ['copy', 'remove'],
|
||||||
actions: {
|
actions: {
|
||||||
name: 'copy', // string;
|
name: 'copy', // string;
|
||||||
content: '+', // string | ReactNode | ActionContentObject;
|
content: '+', // string | ReactNode | ActionContentObject;
|
||||||
items: [], // ComponentAction[];
|
items: [], // ComponentAction[];
|
||||||
condition: 'always', // boolean | ((currentNode: any) => boolean) | 'always';
|
condition: 'always', // boolean | ((currentNode: any) => boolean) | 'always';
|
||||||
important: true, // boolean;
|
important: true, // boolean;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ props 数组下对象字段描述:
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
"configure": {
|
configure: {
|
||||||
advanced: {
|
advanced: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
onNodeAdd: (dragment, currentNode) => {
|
onNodeAdd: (dragment, currentNode) => {
|
||||||
@ -949,7 +949,7 @@ props 数组下对象字段描述:
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getResizingHandlers: () => {
|
getResizingHandlers: () => {
|
||||||
return ["E"];
|
return [ 'E' ];
|
||||||
},
|
},
|
||||||
initials: [
|
initials: [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user