element-ui.scss 3.62 KB
// cover some element-ui styles

.el-button {
  [class^='el-icon-'],
  [class*=' el-icon-'] {
    vertical-align: top;
  }
}

.el-input.el-input--small {
  line-height: 30px;
}

.top-search {
  .el-input,
  .el-select {
    width: 240px;
  }

  .el-date-editor--daterange.el-input__inner {
    width: 240px;
  }
}

.el-tag + .el-tag {
  margin-right: 10px;
}
.el-tag + .el-tag:last-of-type {
  margin-right: 0;
}
.el-tag:nth-of-type(2) {
  margin-left: 10px;
}

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type='file'] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

.el-dialog {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*height:600px;*/
  max-height: calc(100% - 30px);
  max-width: calc(100% - 30px);
}

.el-dialog .el-dialog__body {
  flex: 1;
  overflow: auto;
  padding-top: 15px;
}
// .el-dialog:not(.is-fullscreen) {
//   margin-top: 6vh !important;
// }

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block;
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-table {
  font-size: 13px;
  .el-table__header-wrapper,
  .el-table__fixed-header-wrapper {
    th {
      word-break: break-word;
      // background-color: #f8f8f9;
      color: #515a6e;
      height: 50px;
      font-size: 14px;
    }
  }
  .el-table__body-wrapper tr {
    height: 55px;
  }
}

.app-main.page {
  .el-table {
    background-color: transparent;
    &::before {
      content: none;
    }
    .el-table__header-wrapper th,
    .el-table__fixed-header-wrapper th,
    .el-table__header-wrapper tr {
      background-color: transparent !important;
      height: 40px;
    }
    .el-table__body-wrapper,
    .el-table__fixed-body-wrapper {
      tr {
        box-shadow: 0px 0px 5px 0px rgba(195, 195, 195, 0.35);
        height: 50px;
      }
    }
    // th.is-leaf,
    // td {
    //    border-bottom: 0;
    //  }
    tr td {
      &:first-child {
        border-radius: 4px 0 0 4px;
        border-left: 1px solid #ddd;
      }
      &:last-child {
        border-radius: 0 4px 4px 0;
        border-right: 1px solid #ddd;
      }
    }
    .el-table__body {
      border-spacing: 0 10px;
    }
    .el-table__fixed,
    .el-table__fixed-right {
      &::before {
        content: none;
      }
    }
    .el-table__fixed .el-table__fixed-body-wrapper {
      tr td:last-child {
        border-right: inherit;
      }
    }
    .el-table__fixed-right .el-table__fixed-body-wrapper {
      tr td:first-child {
        border-left: inherit;
      }
    }
  }
}

.el-form-item {
  margin: 0 !important;
  padding: 10px;
  &:hover {
    background: #e5f1fc;
    border-radius: 10px;
  }
}

// 重置el-form-item hover样式
.no-hover-form .el-form-item {
  margin-bottom: 20px !important;
  padding: 0;
  &:hover {
    background: none;
    border-radius: 0;
  }
}