@zhongguo168a/yxeditor-common 0.0.69 → 0.0.71

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
@@ -1501,7 +1501,7 @@ declare class AssetLoader extends Dispatcher {
1501
1501
  uuid?: string;
1502
1502
  }): this;
1503
1503
  loadImageAsset(uri: string, otherConfig?: {
1504
- onHandler?: (err: any, asset: any) => void;
1504
+ onComplete?: (err: any, asset: any) => void;
1505
1505
  }): this;
1506
1506
  protected _loadSpriteFrameByBundle(uri: string, bundle: AssetManager.Bundle): void;
1507
1507
  /**
@@ -1934,6 +1934,12 @@ declare class StringUtil {
1934
1934
  splitIndex(val: string, separator: string, index: number, dflt?: string): string;
1935
1935
  splitFirst(val: string, separator: string, dflt?: string): string;
1936
1936
  splitLast(val: string, separator: string, dflt?: string): string;
1937
+ /**
1938
+ * 从第一个分隔符截断字符串,返回截断的左右字符串
1939
+ * @param val
1940
+ * @param separator
1941
+ */
1942
+ splitFirstArray(val: string, separator: string): [string, string];
1937
1943
  /**
1938
1944
  * 从最后一个分隔符截断字符串,返回截断的左右字符串
1939
1945
  * @param val
package/dist/index.esm.js CHANGED
@@ -4679,7 +4679,7 @@ class AssetLoader extends Dispatcher {
4679
4679
  item.type = "ImageAsset";
4680
4680
  item.uri = new AssetURI(uri);
4681
4681
  if (otherConfig) {
4682
- item.onComplete = otherConfig.onHandler;
4682
+ item.onComplete = otherConfig.onComplete;
4683
4683
  }
4684
4684
  this._loaderList.push(item);
4685
4685
  return this;
@@ -6053,6 +6053,19 @@ class StringUtil {
6053
6053
  }
6054
6054
  return dflt;
6055
6055
  }
6056
+ /**
6057
+ * 从第一个分隔符截断字符串,返回截断的左右字符串
6058
+ * @param val
6059
+ * @param separator
6060
+ */
6061
+ splitFirstArray(val, separator) {
6062
+ let arr = val.split(separator);
6063
+ if (arr.length > 0) {
6064
+ let shift = arr.shift();
6065
+ return [shift, arr.join(separator)];
6066
+ }
6067
+ return [val, ""];
6068
+ }
6056
6069
  /**
6057
6070
  * 从最后一个分隔符截断字符串,返回截断的左右字符串
6058
6071
  * @param val