GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add some necessary methods and attributes · webstager/lowcode-engine@4fd7f27

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • designer/src/designer
      • designer.ts
    • shell/src
      • document-model.ts
      • node.ts
      • props.ts
      • setting-prop-entry.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/designer/src/designer/designer.ts‎

Copy file name to clipboardExpand all lines: packages/designer/src/designer/designer.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ export class Designer {
550550

551551
return reducers.reduce((xprops, reducer) => {
552552
try {
553-
return reducer(xprops, node, { stage });
553+
return reducer(xprops, node.internalToShellNode() as any, { stage });
554554
} catch (e) {
555555
// todo: add log
556556
console.warn(e);
Collapse file

‎packages/shell/src/document-model.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/document-model.ts
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ export default class DocumentModel {
6161
return new DocumentModel(document);
6262
}
6363

64+
/**
65+
* id
66+
*/
67+
get id() {
68+
return this[documentSymbol].id;
69+
}
70+
6471
/**
6572
* 获取当前文档所属的 project
6673
* @returns
Collapse file

‎packages/shell/src/node.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/node.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Props from './props';
99
import DocumentModel from './document-model';
1010
import NodeChildren from './node-children';
1111
import ComponentMeta from './component-meta';
12+
import SettingTopEntry from './setting-top-entry';
1213
import { documentSymbol, nodeSymbol } from './symbols';
1314

1415
const shellNodeSymbol = Symbol('shellNodeSymbol');
@@ -237,6 +238,10 @@ export default class Node {
237238
return this[nodeSymbol].schema;
238239
}
239240

241+
get settingEntry(): any {
242+
return SettingTopEntry.create(this[nodeSymbol].settingEntry as any);
243+
}
244+
240245
/**
241246
* @deprecated use .children instead
242247
*/
Collapse file

‎packages/shell/src/props.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/props.ts
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,23 @@ export default class Props {
9494
setExtraPropValue(path: string, value: CompositeValue) {
9595
return this.getExtraProp(path)?.setValue(value);
9696
}
97+
98+
/**
99+
* test if the specified key is existing or not.
100+
* @param key
101+
* @returns
102+
*/
103+
has(key: string) {
104+
return this[propsSymbol].has(key);
105+
}
106+
107+
/**
108+
* add a key with given value
109+
* @param value
110+
* @param key
111+
* @returns
112+
*/
113+
add(value: CompositeValue, key?: string | number | undefined) {
114+
return this[propsSymbol].add(value, key);
115+
}
97116
}
Collapse file

‎packages/shell/src/setting-prop-entry.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/setting-prop-entry.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export default class SettingPropEntry {
6464
return this[settingPropEntrySymbol].extraProps;
6565
}
6666

67+
get props() {
68+
return SettingTopEntry.create(this[settingPropEntrySymbol].props);
69+
}
70+
6771
/**
6872
* 获取设置属性对应的节点实例
6973
*/

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.