浏览代码

fix(Modal): 全屏modal样式问题 #3019 (#3020)

invalid w 1 年之前
父节点
当前提交
1ac8c56c6b
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      src/components/Modal/src/BasicModal.vue
  2. 1 1
      src/components/Modal/src/index.less

+ 3 - 3
src/components/Modal/src/BasicModal.vue

@@ -1,5 +1,5 @@
 <template>
-  <Modal v-bind="getBindValue" @cancel="handleCancel" wrapClassName="vben-basic-modal">
+  <Modal v-bind="getBindValue" @cancel="handleCancel">
     <template #closeIcon v-if="!$slots.closeIcon">
       <ModalClose
         :canFullscreen="getProps.canFullscreen"
@@ -140,8 +140,8 @@
           ...unref(getMergeProps),
           open: unref(openRef),
         };
-        attr['wrapClassName'] = `${attr?.['wrapClassName'] || ''} ${unref(getWrapClassName)}`;
-
+        attr['wrapClassName'] =
+          `${attr?.['wrapClassName'] || ''} ${unref(getWrapClassName)}` + 'vben-basic-modal-wrap';
         if (unref(fullScreenRef)) {
           return omit(attr, ['height', 'title']);
         }

+ 1 - 1
src/components/Modal/src/index.less

@@ -13,7 +13,7 @@
   }
 }
 
-.vben-basic-modal .ant-modal {
+.vben-basic-modal-wrap .ant-modal {
   width: 520px;
   padding-bottom: 0;