vue中使用el-dialog设置弹窗对话框在前端显示为居中

慈云数据 2024-03-12 技术支持 109 0

废话不多直接上图

在所需要设置的vue文件底部设置

附上代码

   

    ::v-deep .el-dialog{

  dISPlay: flex;

  flex-direCtion: column;

  margin:0 !IMPortant;

  position:absolute;

  top:50%;

  left:50%;

  transform:translate(-50%,-50%);

  max-height:calc(100% - 30px);

  max-width:calc(100% - 30px);

}

::v-deep  .el-dialog .el-dialog__body{

  flex:1;

  overflow: auto;

}

微信扫一扫加客服

微信扫一扫加客服

点击启动AI问答
Draggable Icon