@zhongguo168a/yxeditor-common 0.0.176 → 0.0.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1154,6 +1154,15 @@ declare class MapUtil {
1154
1154
  unflat(object: {
1155
1155
  [key: string]: any;
1156
1156
  }, split?: string): any;
1157
+ /**
1158
+ *
1159
+ * @param object
1160
+ * @param split
1161
+ * @returns
1162
+ */
1163
+ combine(...list: {
1164
+ [key: string]: any;
1165
+ }[]): any;
1157
1166
  /**
1158
1167
  * 返回键值相同的对象,只遍历一层,比较前使用flag展开
1159
1168
  * @param a
@@ -1319,7 +1328,8 @@ declare const viewhistorys: ViewHistory;
1319
1328
 
1320
1329
  declare class ViewModelComponent extends Component {
1321
1330
  /**
1322
- * 往上追踪,返回第一个包含 RouteComponent 的节点, 返回节点中的 RouteView
1331
+ * 往上追踪,返回第一个包含 RouteComponent 的节点, 返回节点中的 RouteView
1332
+ * 对于非同一个父节点的视图(例如对话框通常在canvas节点),需要打开对话框的时候,把视图模型传递给对话框
1323
1333
  * @param node
1324
1334
  */
1325
1335
  static tailNode(node: Node): ViewModel;
package/dist/index.esm.js CHANGED
@@ -1557,6 +1557,22 @@ class MapUtil {
1557
1557
  }
1558
1558
  return result;
1559
1559
  }
1560
+ /**
1561
+ *
1562
+ * @param object
1563
+ * @param split
1564
+ * @returns
1565
+ */
1566
+ combine(...list) {
1567
+ let result = {};
1568
+ for (let i = 0; i < list.length; i++) {
1569
+ let dict = list[i];
1570
+ for (const key in dict) {
1571
+ result[key] = dict[key];
1572
+ }
1573
+ }
1574
+ return result;
1575
+ }
1560
1576
  /**
1561
1577
  * 返回键值相同的对象,只遍历一层,比较前使用flag展开
1562
1578
  * @param a
@@ -4362,7 +4378,8 @@ var ViewModelComponent_1;
4362
4378
  const { ccclass, property, menu } = _decorator;
4363
4379
  let ViewModelComponent = ViewModelComponent_1 = class ViewModelComponent extends Component {
4364
4380
  /**
4365
- * 往上追踪,返回第一个包含 RouteComponent 的节点, 返回节点中的 RouteView
4381
+ * 往上追踪,返回第一个包含 RouteComponent 的节点, 返回节点中的 RouteView
4382
+ * 对于非同一个父节点的视图(例如对话框通常在canvas节点),需要打开对话框的时候,把视图模型传递给对话框
4366
4383
  * @param node
4367
4384
  */
4368
4385
  static tailNode(node) {