重写Element-UI Dialog滚动条样式

原始效果,滚动条在Dialog外部
重写Element-UI Dialog滚动条样式_第1张图片

.reset-dialog {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  ::v-deep .el-dialog {
    margin: 0 auto !important;
    height: 80%;
    overflow: hidden;
    .el-dialog__body {
      position: absolute;
      left: 0;
      top: 54px;
      bottom: 0;
      right: 0;
      padding: 0;
      z-index: 1;
      overflow: hidden;
      overflow-y: auto;
      line-height: 30px;
      padding: 0 15px;
    }
  }
}

修改后效果,滚动条在Dialog内部
重写Element-UI Dialog滚动条样式_第2张图片

你可能感兴趣的:(Vue,Vs,Code,ui,vue.js,javascript)