Commit 37508ca4113701458cae84fff64062427ba43898

Authored by Vben
1 parent ec7bef79

fix(modal): ensure that the height is correct in the modal full screen state close #308

src/components/Modal/src/BasicModal.vue
... ... @@ -32,7 +32,7 @@
32 32 ref="modalWrapperRef"
33 33 :loading="getProps.loading"
34 34 :minHeight="getProps.minHeight"
35   - :height="getProps.height"
  35 + :height="getWrapperHeight"
36 36 :visible="visibleRef"
37 37 :modalFooterHeight="footer !== undefined && !footer ? 0 : undefined"
38 38 v-bind="omit(getProps.wrapperProps, 'visible', 'height')"
... ... @@ -136,8 +136,19 @@
136 136 }
137 137 );
138 138  
139   - const getBindValue = computed((): any => {
140   - return { ...attrs, ...unref(getProps) };
  139 + const getBindValue = computed(
  140 + (): Recordable => {
  141 + const attr = { ...attrs, ...unref(getProps) };
  142 + if (unref(fullScreenRef)) {
  143 + return omit(attr, 'height');
  144 + }
  145 + return attr;
  146 + }
  147 + );
  148 +
  149 + const getWrapperHeight = computed(() => {
  150 + if (unref(fullScreenRef)) return undefined;
  151 + return unref(getProps).height;
141 152 });
142 153  
143 154 watchEffect(() => {
... ... @@ -217,6 +228,7 @@
217 228 handleExtHeight,
218 229 handleHeightChange,
219 230 handleTitleDbClick,
  231 + getWrapperHeight,
220 232 };
221 233 },
222 234 });
... ...