fix(modal): setModalProps support defaultFullscreen

修复setModalProps不支持设置defaultFullscreen的问题
This commit is contained in:
无木 2021-06-28 18:10:26 +08:00
parent 829b366cb2
commit c7de65ebba
2 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -39,6 +39,7 @@ export interface ModalProps {
// 是否可以进行全屏
canFullscreen?: boolean;
defaultFullscreen?: boolean;
visible?: boolean;
// 温馨提醒信息
helpMessage: string | string[];