Skip to content

Commit

Permalink
Merge pull request #217 from suyuan32/dev
Browse files Browse the repository at this point in the history
fix(BasicModal): error when wrapper props is undefined
  • Loading branch information
suyuan32 committed Jun 5, 2024
2 parents c0a9549 + a1d4501 commit 2f243ac
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/Modal/src/BasicModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
:height="getWrapperHeight"
:open="openRef"
:modalFooterHeight="footer !== undefined && !footer ? 0 : undefined"
v-bind="omit(getProps.wrapperProps, ['open', 'height', 'modalFooterHeight'])"
v-bind="
getProps.wrapperProps
? omit(getProps.wrapperProps as any, ['open', 'height', 'modalFooterHeight'])
: {}
"
@ext-height="handleExtHeight"
@height-change="handleHeightChange"
>
Expand Down Expand Up @@ -141,10 +145,11 @@
};
attr['wrapClassName'] =
`${attr?.['wrapClassName'] || ''} ${unref(getWrapClassName)}` + 'vben-basic-modal-wrap';
if (unref(fullScreenRef)) {
return omit(attr, ['height', 'title']);
return omit(attr as any, ['height', 'title']);
}
return omit(attr, ['title']);
return omit(attr as any, ['title']);
});
const getWrapperHeight = computed(() => {
Expand Down

0 comments on commit 2f243ac

Please sign in to comment.