antd——V修改弹框样式

    <div class="centerModal" v-if="yjpic&&yjpic!=''" ref='centerModal'>
      <a-modal
      :getContainer="()=>$refs.centerModal"
        :visible="sfpic"
        :confirm-loading="confirmLoading"
        :maskClosable="false"
        :zIndex="9999"
        @cancel="handleCancel"
        :destroyOnClose="true"
        :keyboard="false"
        :footer="null"
        :centered='true'
        :bodyStaty="{padding:0}"
      >
        <div>
          <img :src="'data:image/png;base64,'+yjpic" style="width:100%;height:100%;margin-top:20px"/>
        </div>
      </a-modal>
      
    </div>

将弹框挂载到 顶层div上,修改弹框 样式
.centerModal {
  .ant-modal-content {
    .ant-modal-footer {
      display: none !important;
    }
    .ant-modal-body{
      padding: 22px 5px 5px 5px!important;
    }
  }
}

  

posted @ 2021-08-04 20:06  吃鸡小能手  阅读(872)  评论(0编辑  收藏  举报