提交 c7de65eb 作者: 无木

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

修复setModalProps不支持设置defaultFullscreen的问题
上级 829b366c
...@@ -187,9 +187,13 @@ ...@@ -187,9 +187,13 @@
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) {
emit('ok', e); emit('ok', e);
......
...@@ -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 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论