Skip to content

Commit

Permalink
fix: resolve issue with Upload component not working correctly inside…
Browse files Browse the repository at this point in the history
… Form (#4916)
  • Loading branch information
anncwb authored Nov 17, 2024
1 parent fe58af2 commit dbcb713
Show file tree
Hide file tree
Showing 5 changed files with 892 additions and 883 deletions.
1 change: 1 addition & 0 deletions internal/lint-configs/eslint-config/src/configs/unicorn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export async function unicorn(): Promise<Linter.Config[]> {
'unicorn/better-regex': 'off',
'unicorn/consistent-destructuring': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/expiring-todo-comments': 'off',
'unicorn/filename-case': 'off',
'unicorn/import-style': 'off',
'unicorn/no-array-for-each': 'off',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"node": ">=20.10.0",
"pnpm": ">=9.12.0"
},
"packageManager": "pnpm@9.13.0",
"packageManager": "pnpm@9.13.2",
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {
Expand Down
4 changes: 3 additions & 1 deletion packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ function fieldBindEvent(slotProps: Record<string, any>) {
if (modelValue && isObject(modelValue) && bindEventField) {
value = isEventObjectLike(modelValue)
? modelValue?.target?.[bindEventField]
: modelValue;
: (modelValue?.[bindEventField] ?? modelValue);
}
if (bindEventField) {
return {
[`onUpdate:${bindEventField}`]: handler,
Expand All @@ -223,6 +224,7 @@ function fieldBindEvent(slotProps: Record<string, any>) {
if (!shouldUnwrap) {
return onChange?.(e);
}
return onChange?.(e?.target?.[bindEventField] ?? e);
},
onInput: () => {},
Expand Down
Loading

0 comments on commit dbcb713

Please sign in to comment.