Skip to content

Commit

Permalink
fix(modal): setModalProps support defaultFullscreen
Browse files Browse the repository at this point in the history
修复setModalProps不支持设置defaultFullscreen的问题
  • Loading branch information
mynetfan committed Jun 28, 2021
1 parent 829b366 commit c7de65e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Modal/src/BasicModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,12 @@
function setModalProps(props: Partial<ModalProps>): void {
// Keep the last setModalProps
propsRef.value = deepMerge(unref(propsRef) || ({} as any), props);
if (!Reflect.has(props, 'visible')) return;
visibleRef.value = !!props.visible;
if (Reflect.has(props, 'visible')) {
visibleRef.value = !!props.visible;
}
if (Reflect.has(props, 'defaultFullscreen')) {
fullScreenRef.value = !!props.defaultFullscreen;
}
}
function handleOk(e: Event) {
Expand Down
1 change: 1 addition & 0 deletions src/components/Modal/src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface ModalProps {

// 是否可以进行全屏
canFullscreen?: boolean;
defaultFullscreen?: boolean;
visible?: boolean;
// 温馨提醒信息
helpMessage: string | string[];
Expand Down

0 comments on commit c7de65e

Please sign in to comment.