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 mergeChldren API for shell node · profencer/lowcode-engine@a47d4ee

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/shell/src
    • node.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/shell/src/node.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/node.ts
+16-2Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default class Node {
8484
/**
8585
* 是否为「模态框」节点
8686
*/
87-
get isModal() {
87+
get isModal() {
8888
return this[nodeSymbol].isModal();
8989
}
9090

@@ -208,7 +208,7 @@ export default class Node {
208208
/**
209209
* 返回节点的属性集
210210
*/
211-
get propsData() {
211+
get propsData() {
212212
return this[nodeSymbol].propsData;
213213
}
214214

@@ -226,6 +226,20 @@ export default class Node {
226226
return this[nodeSymbol].getDOMNode();
227227
}
228228

229+
/**
230+
* 执行新增、删除、排序等操作
231+
* @param remover
232+
* @param adder
233+
* @param sorter
234+
*/
235+
mergeChildren(
236+
remover: (node: Node, idx: number) => boolean,
237+
adder: (children: Node[]) => any,
238+
sorter: (firstNode: Node, secondNode: Node) => number,
239+
) {
240+
return this.children?.mergeChildren(remover, adder, sorter);
241+
}
242+
229243
/**
230244
* 返回节点的尺寸、位置信息
231245
* @returns

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.