@zhongguo168a/yxeditor-common 0.0.70 → 0.0.72

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
@@ -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
@@ -4789,6 +4789,7 @@ class AssetLoader extends Dispatcher {
4789
4789
  case "SpriteFrame": {
4790
4790
  this._loadByItem(item, SpriteFrame, (err, asset) => {
4791
4791
  this._loaded++;
4792
+ item.callHandler(null, asset);
4792
4793
  this.validComplete();
4793
4794
  });
4794
4795
  break;
@@ -4796,6 +4797,7 @@ class AssetLoader extends Dispatcher {
4796
4797
  case "ImageAsset": {
4797
4798
  this._loadByItem(item, ImageAsset, (err, asset) => {
4798
4799
  this._loaded++;
4800
+ item.callHandler(null, asset);
4799
4801
  this.validComplete();
4800
4802
  });
4801
4803
  break;
@@ -6053,6 +6055,19 @@ class StringUtil {
6053
6055
  }
6054
6056
  return dflt;
6055
6057
  }
6058
+ /**
6059
+ * 从第一个分隔符截断字符串,返回截断的左右字符串
6060
+ * @param val
6061
+ * @param separator
6062
+ */
6063
+ splitFirstArray(val, separator) {
6064
+ let arr = val.split(separator);
6065
+ if (arr.length > 0) {
6066
+ let shift = arr.shift();
6067
+ return [shift, arr.join(separator)];
6068
+ }
6069
+ return [val, ""];
6070
+ }
6056
6071
  /**
6057
6072
  * 从最后一个分隔符截断字符串,返回截断的左右字符串
6058
6073
  * @param val