amos-tool 1.6.12 → 1.6.13

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/README.md CHANGED
@@ -650,6 +650,9 @@ convert2Blob(canvas, fn, options)
650
650
 
651
651
  ## changelog
652
652
 
653
+ * v1.6.13
654
+ `*` fix color Log
655
+
653
656
  * v1.6.3
654
657
  `*` fix Log
655
658
 
package/docs/Logger.html CHANGED
@@ -490,7 +490,7 @@ isDebug: true
490
490
  <br class="clear">
491
491
 
492
492
  <footer>
493
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu May 23 2024 21:25:31 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
493
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed May 29 2024 10:20:01 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
494
494
  </footer>
495
495
 
496
496
  <script>prettyPrint();</script>
package/docs/global.html CHANGED
@@ -17768,7 +17768,11 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
17768
17768
  <pre class="prettyprint"><code>toHexColor('rgba(241,112,19)'); // #f17013
17769
17769
  toHexColor('rgba(241,112,19, 1)'); // #f17013
17770
17770
  toHexColor('rgba(241,112,19, 0.1)'); // #f17013
17771
- toHexColor('red'); // #ff0000</code></pre>
17771
+ toHexColor('red'); // #ff0000
17772
+ toHexColor(); // ''
17773
+ toHexColor(null); // ''
17774
+ toHexColor(123456); // ''
17775
+ toHexColor(0x123456123456); // ''</code></pre>
17772
17776
 
17773
17777
 
17774
17778
 
@@ -18901,7 +18905,7 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
18901
18905
  <br class="clear">
18902
18906
 
18903
18907
  <footer>
18904
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu May 23 2024 21:25:31 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
18908
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed May 29 2024 10:20:01 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
18905
18909
  </footer>
18906
18910
 
18907
18911
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -743,6 +743,10 @@ convert2BMP(canvas, width, height)</p>
743
743
  <h2>changelog</h2>
744
744
  <ul>
745
745
  <li>
746
+ <p>v1.6.13
747
+ <code>*</code> fix color Log</p>
748
+ </li>
749
+ <li>
746
750
  <p>v1.6.3
747
751
  <code>*</code> fix Log</p>
748
752
  </li>
@@ -793,7 +797,7 @@ convert2BMP(canvas, width, height)</p>
793
797
  <br class="clear">
794
798
 
795
799
  <footer>
796
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu May 23 2024 21:25:31 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
800
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed May 29 2024 10:20:01 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
797
801
  </footer>
798
802
 
799
803
  <script>prettyPrint();</script>
package/index.d.ts CHANGED
@@ -245,12 +245,12 @@ declare namespace LocationParam {
245
245
  /**
246
246
  * 获取 url 中参数集合
247
247
  * @param url
248
- * @param decode 是否解码
248
+ * @param decode 是否解码, 默认为 false
249
249
  * @example
250
250
  * extractParamAll('/vizmixpub?appId=1536262837746302978&id=1536264796842786817&designerType=vizmix&isPreview=true', 'id');
251
251
  * // { appId: '1536262837746302978', id: '1536264796842786817', designerType: 'vizmix', isPreview: 'true' }
252
252
  */
253
- export function extractParamAll(url: string, decode = false): Object;
253
+ export function extractParamAll(url: string, decode?: boolean): Object;
254
254
  /**
255
255
  * 补全参数
256
256
  * @param {Object} param
@@ -515,6 +515,10 @@ declare namespace colorUtil {
515
515
  * toHexColor('rgba(241,112,19, 1)'); // #f17013
516
516
  * toHexColor('rgba(241,112,19, 0.1)'); // #f17013
517
517
  * toHexColor('red'); // #ff0000
518
+ * toHexColor(); // ''
519
+ * toHexColor(null); // ''
520
+ * toHexColor(123456); // ''
521
+ * toHexColor(0x123456123456); // ''
518
522
  */
519
523
  export function toHexColor(stringRgb: string): string;
520
524
  /**
@@ -747,7 +751,7 @@ declare namespace arrayUtils {
747
751
  * @param source 原始数组
748
752
  * @param compareFn 排序方法
749
753
  */
750
- export function deduplicateAndSort(source: [], compareFn: (a: T, b: T) => number): [];
754
+ export function deduplicateAndSort(source: [], compareFn: (a: any, b: any) => number): [];
751
755
  /**
752
756
  * 通过索引删除数组指定位置的数据。
753
757
  *
@@ -771,7 +775,7 @@ declare namespace arrayUtils {
771
775
  * const array2 = [[5, 6], [7, 8]];
772
776
  * merge2DArraysDiagonally(array1, array2); // 输出: [[1, 2, 5, 6], [3, 4, 7, 8]]
773
777
  */
774
- export function merge2DArraysDiagonally(arr1: T[][], arr2: T[][]): T[][];
778
+ export function merge2DArraysDiagonally(arr1: any[][], arr2: any[][]): any[][];
775
779
  }
776
780
 
777
781
  declare namespace algor {
@@ -897,26 +901,26 @@ export function subtraction(arg1, arg2): number;
897
901
  * 小数乘法
898
902
  * @param arg1 被乘数(接受小数和整数)
899
903
  * @param arg2 乘数(接受小数和整数)
900
- * @param fix 乘积保留几位(接受正负整数以及0
904
+ * @param fix 乘积保留几位(接受正负整数以及0),默认值为 0
901
905
  * @returns {Number}
902
906
  * @example
903
907
  * accMul(0.56, 100); // 56
904
908
  * accMul(0.5679, 100); // 57
905
909
  * accMul(0.5679, 100.2); // 57
906
910
  */
907
- export function accMul(arg1: Number, arg2: Number, fix = 0): number;
911
+ export function accMul(arg1: Number, arg2: Number, fix?: Number): number;
908
912
  /**
909
913
  * 小数除法
910
914
  * @param arg1 被乘数(接受小数和整数)
911
915
  * @param arg2 乘数(接受小数和整数)
912
- * @param fix 乘积保留几位(接受正负整数以及0
916
+ * @param fix 除法保留几位(接受正负整数以及0),默认值为 0
913
917
  * @returns {Number}
914
918
  * @example
915
919
  * accDivide(56, 100); // 0.56
916
920
  * accDivide(5679, 100, 2); // 56.79
917
921
  * accDivide(5679, 100.2, 2); // 56.68
918
922
  */
919
- export function accDivide(arg1: Number, arg2: Number, fix = 0): number;
923
+ export function accDivide(arg1: Number, arg2: Number, fix?: Number): number;
920
924
 
921
925
  /**
922
926
  * 将数值格式化成金额形式
@@ -1360,7 +1364,7 @@ declare namespace flat {
1360
1364
  /**
1361
1365
  * 获取树结构数据 flat keys
1362
1366
  * @param item
1363
- * @param options
1367
+ * @param options 默认值为 { uniqueKey: 'key', childrenKey: 'children' }
1364
1368
  */
1365
- export function getTreeFlatKeys(item: Object | any[], options = { uniqueKey: 'key', childrenKey: 'children' }): String[] | Number[];
1369
+ export function getTreeFlatKeys(item: Object | any[], options?: { uniqueKey?: 'key', childrenKey?: 'children' }): String[] | Number[];
1366
1370
  }
@@ -21,8 +21,10 @@ var utils = require("./../utils"), colorKeyWordsHexStr = require("./_keyColor"),
21
21
  return a;
22
22
  }
23
23
  }, toHexColor = function(r) {
24
+ if (utils.isNil(r)) return "";
24
25
  if (isHexColor(r)) return r;
25
26
  if (isKeyColor(r)) return colorKeyWordsHexStr[r];
27
+ if (!utils.isString(r)) return "";
26
28
  var e = r;
27
29
  r.indexOf("rgb") > -1 && (e = e.replace(rgbaRegex, ""));
28
30
  for (var t = e.split(","), o = "#", n = 0; n < t.length; n++) if (n < 3) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amos-tool",
3
- "version": "1.6.12",
3
+ "version": "1.6.13",
4
4
  "description": "amos ui tool",
5
5
  "main": "index.js",
6
6
  "directories": {