Commit c7de65ebba53941771153f18b184d3d4d31c0dbf
1 parent
829b366c
fix(modal): `setModalProps` support `defaultFullscreen`
修复setModalProps不支持设置defaultFullscreen的问题
Showing
2 changed files
with
7 additions
and
2 deletions
src/components/Modal/src/BasicModal.vue
... | ... | @@ -187,8 +187,12 @@ |
187 | 187 | function setModalProps(props: Partial<ModalProps>): void { |
188 | 188 | // Keep the last setModalProps |
189 | 189 | propsRef.value = deepMerge(unref(propsRef) || ({} as any), props); |
190 | - if (!Reflect.has(props, 'visible')) return; | |
191 | - visibleRef.value = !!props.visible; | |
190 | + if (Reflect.has(props, 'visible')) { | |
191 | + visibleRef.value = !!props.visible; | |
192 | + } | |
193 | + if (Reflect.has(props, 'defaultFullscreen')) { | |
194 | + fullScreenRef.value = !!props.defaultFullscreen; | |
195 | + } | |
192 | 196 | } |
193 | 197 | |
194 | 198 | function handleOk(e: Event) { | ... | ... |