diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml
index 1ae1950fee..e0f4e15c83 100644
--- a/.github/workflows/size-limit.yml
+++ b/.github/workflows/size-limit.yml
@@ -5,12 +5,14 @@ on:
types: [opened, synchronize]
permissions:
- contents: read
+ contents: write
+ pull-requests: write
jobs:
size:
permissions:
- contents: read
+ checks: read
+ contents: write
pull-requests: write
runs-on: ubuntu-latest
diff --git a/package.json b/package.json
index 9f74a19637..cb41ae4de3 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,6 @@
"classnames": "^2.3.2",
"dayjs": "^1.11.7",
"deepmerge": "^4.3.1",
- "lodash": "^4.17.21",
"nano-memoize": "^3.0.16",
"rc-field-form": "~1.27.4",
"rc-util": "^5.38.1",
@@ -101,6 +100,7 @@
"jest-environment-jsdom": "^28.1.3",
"jest-watch-typeahead": "^1.1.0",
"less": "^4.1.3",
+ "lodash": "^4.17.21",
"lorem-ipsum": "^2.0.8",
"lz-string": "^1.5.0",
"mockdate": "^3.0.5",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 561eb91dde..154b469014 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -39,9 +39,6 @@ dependencies:
deepmerge:
specifier: ^4.3.1
version: 4.3.1
- lodash:
- specifier: ^4.17.21
- version: 4.17.21
nano-memoize:
specifier: ^3.0.16
version: 3.0.16
@@ -254,6 +251,9 @@ devDependencies:
less:
specifier: ^4.1.3
version: 4.2.0
+ lodash:
+ specifier: ^4.17.21
+ version: 4.17.21
lorem-ipsum:
specifier: ^2.0.8
version: 2.0.8
diff --git a/src/utils/with-default-props.tsx b/src/utils/with-default-props.tsx
index 1780272000..3446d7dea6 100644
--- a/src/utils/with-default-props.tsx
+++ b/src/utils/with-default-props.tsx
@@ -1,15 +1,13 @@
-import assignWith from 'lodash/assignWith'
-
export function mergeProps(a: A, b: B): B & A
export function mergeProps(a: A, b: B, c: C): C & B & A
export function mergeProps(...items: any[]) {
- function customizer(objValue: any, srcValue: any) {
- return srcValue === undefined ? objValue : srcValue
- }
-
- let ret = { ...items[0] }
- for (let i = 1; i < items.length; i++) {
- ret = assignWith(ret, items[i], customizer)
- }
+ const ret: any = {}
+ items.forEach(item => {
+ Object.keys(item).forEach(key => {
+ if (item[key] !== undefined) {
+ ret[key] = item[key]
+ }
+ })
+ })
return ret
}