@zhongguo168a/yxeditor-common 0.0.165 → 0.0.166

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
@@ -735,7 +735,7 @@ declare class ListSource extends EventDispatcher {
735
735
  * @param arr
736
736
  * @param idCreator
737
737
  */
738
- static createByArray(arr: any[], idCreator?: (item: any) => string, target?: ListSource): ListSource;
738
+ static createByArray(arr: any[], target?: ListSource, idCreator?: (item: any) => string): ListSource;
739
739
  static createByListItem(arr: IListItem[], target?: ListSource): any;
740
740
  /**
741
741
  * 设置数据时触发
package/dist/index.esm.js CHANGED
@@ -2941,7 +2941,7 @@ class ListSource extends EventDispatcher {
2941
2941
  * @param arr
2942
2942
  * @param idCreator
2943
2943
  */
2944
- static createByArray(arr, idCreator, target) {
2944
+ static createByArray(arr, target, idCreator) {
2945
2945
  if (!target) {
2946
2946
  target = new ListSource();
2947
2947
  }
@@ -2952,7 +2952,7 @@ class ListSource extends EventDispatcher {
2952
2952
  id = idCreator(item);
2953
2953
  }
2954
2954
  else {
2955
- id = identutil.genOne();
2955
+ id = i.toString();
2956
2956
  }
2957
2957
  let node = ListNode.create(id, item);
2958
2958
  target.add(node, false);