Преглед изворни кода

feat(wise-cost-util): 按需引入

zhangweicheng пре 3 година
родитељ
комит
f4b581df75

+ 4 - 4
wise-cost-util/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@sc/wise-cost-util",
-  "version": "1.1.9",
+  "version": "1.1.10",
   "description": "wise-cost项目前后端业务通用工具包",
   "main": "./dist/index.cjs.js",
   "module": "./dist/index.esm.js",
@@ -22,7 +22,7 @@
     "@commitlint/config-conventional": "^11.0.0",
     "@sc/types": "^1.0.41",
     "@types/chai": "^4.2.14",
-    "@types/lodash": "^4.14.168",
+    "@types/lodash-es": "4.17.7",
     "@types/mocha": "^8.0.4",
     "@types/ms": "^0.7.31",
     "@types/uuid": "8.3.0",
@@ -50,8 +50,8 @@
   },
   "dependencies": {
     "@sc/util": "^1.0.7",
-    "lodash": "^4.17.21",
+    "lodash-es": "4.17.6",
     "evaluator.js": "^3.2.3",
     "uuid": "8.3.1"
   }
-}
+}

+ 1 - 1
wise-cost-util/src/businessForm.ts

@@ -1,4 +1,4 @@
-import { uniq } from 'lodash';
+import { uniq } from 'lodash-es';
 import { IMatterNode } from '@sc/types';
 
 // 获取表单必填的字段名称

+ 1 - 1
wise-cost-util/src/glj.ts

@@ -14,7 +14,7 @@ import {
   TaxType,
 } from '@sc/types';
 import { roundForObj } from '@sc/util';
-import { find } from 'lodash';
+import { find } from 'lodash-es';
 
 export const getInfoMarketPrice = (info: IInfoPriceItem, taxType: TaxType) => {
   // 1: 一般计税 2: 简易计税

+ 1 - 1
wise-cost-util/src/process.ts

@@ -1,5 +1,5 @@
 import { ApprovalWay, ProcessStatus, IProcess, ApprovalStatus, IProcedureProcess } from '@sc/types';
-import { isEmpty } from 'lodash';
+import { isEmpty } from 'lodash-es';
 
 // 获取流程某个环节审批状态
 export const getProcessStatus = (process: IProcess) => {

+ 1 - 1
wise-cost-util/src/rationAss.ts

@@ -1,5 +1,5 @@
 import { IRationAss, IThirdRation } from '@sc/types';
-import { ceil, floor, round, sortBy } from 'lodash';
+import { ceil, floor, round, sortBy } from 'lodash-es';
 import { roundForObj } from '@sc/util';
 
 export interface IAssTime {

+ 1 - 1
wise-cost-util/src/rationInst.ts

@@ -1,5 +1,5 @@
 import { ICptRation, IInstallationFee, IRationInstall, IStdRation, IRation } from '@sc/types';
-import { find } from 'lodash';
+import { find } from 'lodash-es';
 import { v1 } from 'uuid';
 
 export const getRationInstallFee = (

+ 1 - 1
wise-cost-util/src/threeInOneProcess.ts

@@ -1,5 +1,5 @@
 import { ApprovalWay, ProcessStatus, IProcess, ApprovalStatus, IProcedureProcess } from '@sc/types';
-import { isEmpty } from 'lodash';
+import { isEmpty } from 'lodash-es';
 
 // 获取流程某个环节审批状态
 export const getProcedureProcessStatus = (process: IProcedureProcess): ProcessStatus => {