wargerm 0.7.73 → 0.7.75

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.esm.js CHANGED
@@ -2355,14 +2355,16 @@ function Index$1(_ref, ref) {
2355
2355
  progress = _useState4[0],
2356
2356
  setProgress = _useState4[1];
2357
2357
  useEffect(function () {
2358
- setFileList(value ? value.split(splitStr).map(function (url) {
2359
- return {
2360
- uid: Math.random().toString(36).slice(2, 36),
2361
- name: url,
2362
- status: 'done',
2363
- url: url
2364
- };
2365
- }) : []);
2358
+ if (value) {
2359
+ setFileList(typeof value == 'string' ? value.split(splitStr).map(function (url) {
2360
+ return {
2361
+ uid: Math.random().toString(36).slice(2, 36),
2362
+ name: url,
2363
+ status: 'done',
2364
+ url: url
2365
+ };
2366
+ }) : value);
2367
+ }
2366
2368
  }, [value]);
2367
2369
  useEffect(function () {
2368
2370
  console.log(fileList);
@@ -2425,8 +2427,11 @@ function Index$1(_ref, ref) {
2425
2427
  }).join(splitStr);
2426
2428
  onChange && onChange(urls);
2427
2429
  }
2430
+ if (beforeUpload && !beforeUpload()) {
2431
+ onChange && onChange(_toConsumableArray(newFileList));
2432
+ }
2428
2433
  setFileList(_toConsumableArray(newFileList));
2429
- case 3:
2434
+ case 4:
2430
2435
  case "end":
2431
2436
  return _context.stop();
2432
2437
  }
@@ -2795,10 +2800,10 @@ Index$4.Group = Checkbox.Group;
2795
2800
  /*
2796
2801
  * @Author: lijin
2797
2802
  * @Date: 2021-10-27 22:18:49
2798
- * @LastEditTime: 2022-08-11 10:57:14
2803
+ * @LastEditTime: 2023-12-27 18:45:14
2799
2804
  * @LastEditors: lijin
2800
2805
  * @Description:
2801
- * @FilePath: \wargerm-components\src\utils\index.ts
2806
+ * @FilePath: \wargerm\src\utils\index.ts
2802
2807
  * 可以输入预定的版权声明、个性签名、空行等
2803
2808
  */
2804
2809
  /**
@@ -2810,11 +2815,14 @@ function filterObj(obj) {
2810
2815
  if (!(_typeof(obj) === 'object')) {
2811
2816
  return;
2812
2817
  }
2813
- for (var key in obj) {
2814
- if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
2815
- delete obj[key];
2816
- }
2817
- }
2818
+ // for (const key in obj) {
2819
+ // if (
2820
+ // obj.hasOwnProperty(key) &&
2821
+ // (obj[key] == null || obj[key] == undefined || obj[key] === '')
2822
+ // ) {
2823
+ // delete obj[key];
2824
+ // }
2825
+ // }
2818
2826
  return obj;
2819
2827
  }
2820
2828
  /**
package/dist/index.js CHANGED
@@ -2399,14 +2399,16 @@ function Index$1(_ref, ref) {
2399
2399
  progress = _useState4[0],
2400
2400
  setProgress = _useState4[1];
2401
2401
  React.useEffect(function () {
2402
- setFileList(value ? value.split(splitStr).map(function (url) {
2403
- return {
2404
- uid: Math.random().toString(36).slice(2, 36),
2405
- name: url,
2406
- status: 'done',
2407
- url: url
2408
- };
2409
- }) : []);
2402
+ if (value) {
2403
+ setFileList(typeof value == 'string' ? value.split(splitStr).map(function (url) {
2404
+ return {
2405
+ uid: Math.random().toString(36).slice(2, 36),
2406
+ name: url,
2407
+ status: 'done',
2408
+ url: url
2409
+ };
2410
+ }) : value);
2411
+ }
2410
2412
  }, [value]);
2411
2413
  React.useEffect(function () {
2412
2414
  console.log(fileList);
@@ -2469,8 +2471,11 @@ function Index$1(_ref, ref) {
2469
2471
  }).join(splitStr);
2470
2472
  onChange && onChange(urls);
2471
2473
  }
2474
+ if (beforeUpload && !beforeUpload()) {
2475
+ onChange && onChange(_toConsumableArray(newFileList));
2476
+ }
2472
2477
  setFileList(_toConsumableArray(newFileList));
2473
- case 3:
2478
+ case 4:
2474
2479
  case "end":
2475
2480
  return _context.stop();
2476
2481
  }
@@ -2839,10 +2844,10 @@ Index$4.Group = antd.Checkbox.Group;
2839
2844
  /*
2840
2845
  * @Author: lijin
2841
2846
  * @Date: 2021-10-27 22:18:49
2842
- * @LastEditTime: 2022-08-11 10:57:14
2847
+ * @LastEditTime: 2023-12-27 18:45:14
2843
2848
  * @LastEditors: lijin
2844
2849
  * @Description:
2845
- * @FilePath: \wargerm-components\src\utils\index.ts
2850
+ * @FilePath: \wargerm\src\utils\index.ts
2846
2851
  * 可以输入预定的版权声明、个性签名、空行等
2847
2852
  */
2848
2853
  /**
@@ -2854,11 +2859,14 @@ function filterObj(obj) {
2854
2859
  if (!(_typeof(obj) === 'object')) {
2855
2860
  return;
2856
2861
  }
2857
- for (var key in obj) {
2858
- if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
2859
- delete obj[key];
2860
- }
2861
- }
2862
+ // for (const key in obj) {
2863
+ // if (
2864
+ // obj.hasOwnProperty(key) &&
2865
+ // (obj[key] == null || obj[key] == undefined || obj[key] === '')
2866
+ // ) {
2867
+ // delete obj[key];
2868
+ // }
2869
+ // }
2862
2870
  return obj;
2863
2871
  }
2864
2872
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.73",
4
+ "version": "0.7.75",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",