@zhongguo168a/yxeditor-common 0.0.153 → 0.0.154

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
@@ -726,7 +726,7 @@ declare class Dictionary<K = string, V = any> {
726
726
  * 克隆自身所有项到【target】对象,并返回【target】对象
727
727
  * @param target
728
728
  */
729
- clone(target: Dictionary<K, V>): Dictionary<K, V>;
729
+ clone(target?: Dictionary<K, V>): Dictionary<K, V>;
730
730
  resetByDict(dict: Dictionary<K, V>): void;
731
731
  onSet(caller: any, handler: (key: K, value: V) => void): void;
732
732
  onDelete(caller: any, handler: (key: K, value: V) => void): void;
package/dist/index.esm.js CHANGED
@@ -2884,6 +2884,9 @@ class Dictionary {
2884
2884
  * @param target
2885
2885
  */
2886
2886
  clone(target) {
2887
+ if (!target) {
2888
+ target = new Dictionary();
2889
+ }
2887
2890
  for (const key in this._data) {
2888
2891
  let item = this._data[key];
2889
2892
  // @ts-ignore