Skip to content

Commit

Permalink
fix(BasicModal): error when wrapper props is undefined
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
1 parent cc964b2 commit a1d4501
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 a1d4501

Please sign in to comment.