ls-pro-common 3.1.38 → 3.1.40

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.
@@ -807,7 +807,7 @@ function useDtl(dtlParam) {
807
807
  // showSuccess(result.flag?.retMsg || '导出成功');
808
808
  return _context10.abrupt("return", true);
809
809
  case 19:
810
- if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes((result === null || result === void 0 ? void 0 : (_result$flag8 = result.flag) === null || _result$flag8 === void 0 ? void 0 : _result$flag8.retCode) || '0')) {
810
+ if (!['9101', '9102', '9103', '9013', '9014', '9110', '9201'].includes((result === null || result === void 0 ? void 0 : (_result$flag8 = result.flag) === null || _result$flag8 === void 0 ? void 0 : _result$flag8.retCode) || '0')) {
811
811
  _context10.next = 23;
812
812
  break;
813
813
  }
@@ -606,7 +606,7 @@ function useSingle(inParam) {
606
606
  exportProcess(result);
607
607
  return _context8.abrupt("return", true);
608
608
  case 20:
609
- if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes(code)) {
609
+ if (!['9101', '9102', '9103', '9013', '9014', '9110', '9201'].includes(code)) {
610
610
  _context8.next = 24;
611
611
  break;
612
612
  }
@@ -189,4 +189,5 @@ declare const mdmMap: {
189
189
  };
190
190
  export declare type MdmType = keyof typeof mdmMap;
191
191
  export declare const getMdmData: (type: MdmType, params?: any) => Promise<any>;
192
+ export declare const clearMdmCache: () => void;
192
193
  export {};
@@ -381,4 +381,12 @@ export var getMdmData = function getMdmData(type) {
381
381
  throw new Error("".concat(type, " \u4E0D\u5B58\u5728"));
382
382
  }
383
383
  return fn(params);
384
+ };
385
+ export var clearMdmCache = function clearMdmCache() {
386
+ // 清空所有 mdm- 开头的缓存
387
+ Object.keys(sessionStorage).forEach(function (key) {
388
+ if (key.startsWith('mdm-')) {
389
+ sessionStorage.removeItem(key);
390
+ }
391
+ });
384
392
  };
@@ -807,7 +807,7 @@ function useDtl(dtlParam) {
807
807
  // showSuccess(result.flag?.retMsg || '导出成功');
808
808
  return _context10.abrupt("return", true);
809
809
  case 19:
810
- if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes((result === null || result === void 0 ? void 0 : (_result$flag8 = result.flag) === null || _result$flag8 === void 0 ? void 0 : _result$flag8.retCode) || '0')) {
810
+ if (!['9101', '9102', '9103', '9013', '9014', '9110', '9201'].includes((result === null || result === void 0 ? void 0 : (_result$flag8 = result.flag) === null || _result$flag8 === void 0 ? void 0 : _result$flag8.retCode) || '0')) {
811
811
  _context10.next = 23;
812
812
  break;
813
813
  }
@@ -606,7 +606,7 @@ function useSingle(inParam) {
606
606
  exportProcess(result);
607
607
  return _context8.abrupt("return", true);
608
608
  case 20:
609
- if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes(code)) {
609
+ if (!['9101', '9102', '9103', '9013', '9014', '9110', '9201'].includes(code)) {
610
610
  _context8.next = 24;
611
611
  break;
612
612
  }
@@ -189,4 +189,5 @@ declare const mdmMap: {
189
189
  };
190
190
  export declare type MdmType = keyof typeof mdmMap;
191
191
  export declare const getMdmData: (type: MdmType, params?: any) => Promise<any>;
192
+ export declare const clearMdmCache: () => void;
192
193
  export {};
@@ -381,4 +381,12 @@ export var getMdmData = function getMdmData(type) {
381
381
  throw new Error("".concat(type, " \u4E0D\u5B58\u5728"));
382
382
  }
383
383
  return fn(params);
384
+ };
385
+ export var clearMdmCache = function clearMdmCache() {
386
+ // 清空所有 mdm- 开头的缓存
387
+ Object.keys(sessionStorage).forEach(function (key) {
388
+ if (key.startsWith('mdm-')) {
389
+ sessionStorage.removeItem(key);
390
+ }
391
+ });
384
392
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "3.1.38",
3
+ "version": "3.1.40",
4
4
  "description": "ls-pro-common",
5
5
  "license": "MIT",
6
6
  "sideEffects": [