Commit c7de65eb authored by 无木's avatar 无木

fix(modal): `setModalProps` support `defaultFullscreen`

修复setModalProps不支持设置defaultFullscreen的问题
parent 829b366c
...@@ -187,8 +187,12 @@ ...@@ -187,8 +187,12 @@
function setModalProps(props: Partial<ModalProps>): void { function setModalProps(props: Partial<ModalProps>): void {
// Keep the last setModalProps // Keep the last setModalProps
propsRef.value = deepMerge(unref(propsRef) || ({} as any), props); propsRef.value = deepMerge(unref(propsRef) || ({} as any), props);
if (!Reflect.has(props, 'visible')) return; if (Reflect.has(props, 'visible')) {
visibleRef.value = !!props.visible; visibleRef.value = !!props.visible;
}
if (Reflect.has(props, 'defaultFullscreen')) {
fullScreenRef.value = !!props.defaultFullscreen;
}
} }
function handleOk(e: Event) { function handleOk(e: Event) {
......
...@@ -39,6 +39,7 @@ export interface ModalProps { ...@@ -39,6 +39,7 @@ export interface ModalProps {
// 是否可以进行全屏 // 是否可以进行全屏
canFullscreen?: boolean; canFullscreen?: boolean;
defaultFullscreen?: boolean;
visible?: boolean; visible?: boolean;
// 温馨提醒信息 // 温馨提醒信息
helpMessage: string | string[]; helpMessage: string | string[];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment