@import "mixins/mixins";
@import "common/var";

/**Variable**/
@import "./base/variable.scss";
@import "./base/css-variable.scss";
@import "./helpers/mixin.scss";
@import "./base/checked.scss";
@import "./base/common.scss";
@import "./base/tooltip.scss";
@import "./base/filter.scss";
@import "./loading.scss";

%DefaultColumnHeight {
  height: $el-table-plus-row-height-default;
}

%MediumColumnHeight {
  height: $el-table-plus-row-height-medium;
}

%SmallColumnHeight {
  height: $el-table-plus-row-height-small;
}

%MiniColumnHeight {
  height: $el-table-plus-row-height-mini;
}

.el-table-plus-slots,
.el-table-plus--file-form {
  display: none;
}

.el-table-plus--print-frame {
  position: fixed;
  bottom: -100%;
  left: -100%;
  height: 0;
  width: 0;
  border: 0;
}

.el-table-plus--body-wrapper {
  scroll-behavior: auto;
}
.el-table-plus--body-wrapper,
.el-table-plus--fixed-left-body-wrapper,
.el-table-plus--fixed-right-body-wrapper {
  overflow-y: auto;
  overflow-x: auto;
}

/*默认的渲染*/
.table-plus-cell,
.el-table-plus--filter-wrapper {
  .table-plus-default-input,
  .table-plus-default-textarea {
    background-color: $el-table-plus-body-background-color;
  }
  .table-plus-default-input,
  .table-plus-default-textarea,
  .table-plus-default-select {
    outline: 0;
    padding: 0 2px;
    width: 100%;
    color: $table-plus-font-color;
    border-radius: $table-plus-border-radius;
    border: 1px solid $table-plus-input-border-color;
    &:focus {
      border: 1px solid $table-plus-primary-color;
    }
    &[disabled] {
      cursor: not-allowed;
      background-color: $table-plus-input-disabled-background-color;
    }
  }
  .table-plus-default-input,
  .table-plus-default-textarea,
  .table-plus-default-select {
    height: $table-plus-input-height-default;
  }
  .table-plus-default-input {
    &[type="date"]::-webkit-inner-spin-button {
      margin-top: 4px;
    }
    &[type="date"]::-webkit-inner-spin-button,
    &[type="number"]::-webkit-inner-spin-button {
      height: 24px;
    }
    &::placeholder {
      color: $table-plus-input-placeholder-color;
    }
  }
  .table-plus-default-textarea {
    resize: none;
    vertical-align: middle;
  }
  .table-plus-input,
  .table-plus-textarea,
  .table-plus-select {
    width: 100%;
    display: block;
  }
  .table-plus-input > .table-plus-input--inner,
  .table-plus-textarea > .table-plus-textarea--inner {
    padding: 0 2px;
  }
  .table-plus-textarea--inner,
  .table-plus-default-textarea {
    resize: none;
  }
}

.el-table-plus--checkbox-range,
.el-table-plus--cell-main-area,
.el-table-plus--cell-extend-area,
.el-table-plus--cell-active-area,
.el-table-plus--cell-copy-area {
  display: none;
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.el-table-plus--fixed-left-wrapper,
.el-table-plus--fixed-right-wrapper {
  .el-table-plus--checkbox-range,
  .el-table-plus--cell-main-area,
  .el-table-plus--cell-extend-area,
  .el-table-plus--cell-active-area,
  .el-table-plus--cell-copy-area {
    z-index: 2;
  }
}

.el-table-plus--fixed-left-wrapper {
  .el-table-plus--cell-main-area,
  .el-table-plus--cell-extend-area,
  .el-table-plus--cell-active-area {
    &[half="1"] {
      border-right: 0;
    }
  }
  .el-table-plus--cell-copy-area {
    &[half="1"] {
      background-size: $el-table-plus-cell-copy-area-border-width 12px, 0 12px,
        12px $el-table-plus-cell-copy-area-border-width,
        12px $el-table-plus-cell-copy-area-border-width;
    }
  }
}

.el-table-plus--fixed-right-wrapper {
  .el-table-plus--cell-main-area,
  .el-table-plus--cell-extend-area,
  .el-table-plus--cell-active-area {
    &[half="1"] {
      border-left: 0;
    }
  }
  .el-table-plus--cell-copy-area {
    &[half="1"] {
      background-size: 0 12px, $el-table-plus-cell-copy-area-border-width 12px,
        12px $el-table-plus-cell-copy-area-border-width,
        12px $el-table-plus-cell-copy-area-border-width;
    }
  }
}

/*复选框-范围选择*/
.el-table-plus--checkbox-range {
  background-color: $el-table-plus-checkbox-range-background-color;
  border: $el-table-plus-checkbox-range-border-width solid
    $el-table-plus-checkbox-range-border-color;
}

.el-table-plus--cell-area {
  height: 0;
  font-size: 0;
  display: none;
  & > .el-table-plus--cell-main-area {
    background-color: $el-table-plus-cell-area-background-color;
    border: $el-table-plus-cell-area-border-width solid
      $el-table-plus-cell-area-border-color;
  }
  .el-table-plus--cell-main-area-btn {
    display: none;
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 7px;
    height: 7px;
    border-style: solid;
    border-color: $el-table-plus-cell-main-area-extension-border-color;
    border-width: 1px 0 0 1px;
    background-color: $el-table-plus-cell-main-area-extension-background-color;
    pointer-events: auto;
    cursor: crosshair;
  }
  .el-table-plus--cell-extend-area {
    border: $el-table-plus-cell-extend-area-border-width solid
      $el-table-plus-cell-extend-area-border-color;
  }
}

@keyframes moveCopyCellBorder {
  from {
  }
  to {
    background-position: 0 -12px, 100% 12px, 12px 0, -12px 100%;
  }
}

.el-table-plus--cell-copy-area {
  background: linear-gradient(
        0deg,
        transparent 6px,
        $el-table-plus-cell-copy-area-border-color 6px
      )
      repeat-y,
    linear-gradient(
        0deg,
        transparent 50%,
        $el-table-plus-cell-copy-area-border-color 0
      )
      repeat-y,
    linear-gradient(
        90deg,
        transparent 50%,
        $el-table-plus-cell-copy-area-border-color 0
      )
      repeat-x,
    linear-gradient(
        90deg,
        transparent 50%,
        $el-table-plus-cell-copy-area-border-color 0
      )
      repeat-x;
  background-size: $el-table-plus-cell-copy-area-border-width 12px,
    $el-table-plus-cell-copy-area-border-width 12px,
    12px $el-table-plus-cell-copy-area-border-width,
    12px $el-table-plus-cell-copy-area-border-width;
  background-position: 0 0, 100% 0, 0 0, 0 100%;
  animation: moveCopyCellBorder 0.5s infinite linear;
}

.el-table-plus--cell-active-area {
  border: $el-table-plus-cell-active-area-border-width solid
    $el-table-plus-cell-active-area-border-color;
}

.el-table-plus--cell-multi-area {
  & > .el-table-plus--cell-main-area {
    background-color: $el-table-plus-cell-area-background-color;
  }
}

/*圆角*/
.el-table-plus--render-default {
  &.is--round {
    %AllRadius {
      border-radius: $el-table-plus-border-radius;
    }
    %TopRadius {
      border-radius: $el-table-plus-border-radius $el-table-plus-border-radius 0
        0;
    }
    %TopLeftRadius {
      border-radius: $el-table-plus-border-radius 0 0 0;
    }
    %TopRightRadius {
      border-radius: 0 $el-table-plus-border-radius 0 0;
    }
    %BottomRadius {
      border-radius: 0 0 $el-table-plus-border-radius
        $el-table-plus-border-radius;
    }
    %BottomLeftRadius {
      border-radius: 0 0 0 $el-table-plus-border-radius;
    }
    %BottomRightRadius {
      border-radius: 0 0 $el-table-plus-border-radius 0;
    }
    @extend %AllRadius;
    .el-table-plus--border-line {
      @extend %AllRadius;
    }
    &.is--header {
      &:not(.is--footer) {
        .el-table-plus--body-wrapper {
          &.fixed-left--wrapper {
            @extend %BottomLeftRadius;
          }
          &.body--wrapper {
            @extend %BottomRadius;
          }
          &.fixed-right--wrapper {
            @extend %BottomRightRadius;
          }
        }
      }
      .el-table-plus--header-wrapper {
        &.fixed-left--wrapper {
          @extend %TopLeftRadius;
        }
        &.body--wrapper {
          @extend %TopRadius;
        }
        &.fixed-right--wrapper {
          @extend %TopRightRadius;
        }
      }
    }
    &:not(.is--header) {
      &:not(.is--footer) {
        .el-table-plus--body-wrapper {
          &.body--wrapper {
            @extend %AllRadius;
          }
        }
      }
    }
    &.is--footer {
      &:not(.is--header) {
        .el-table-plus--body-wrapper {
          &.fixed-left--wrapper {
            @extend %BottomLeftRadius;
          }
          &.body--wrapper {
            @extend %TopRadius;
          }
          &.fixed-right--wrapper {
            @extend %BottomRightRadius;
          }
        }
      }
      .el-table-plus--footer-wrapper {
        &.fixed-left--wrapper {
          @extend %BottomLeftRadius;
        }
        &.body--wrapper {
          @extend %BottomRadius;
        }
        &.fixed-right--wrapper {
          @extend %BottomRightRadius;
        }
      }
    }
  }
}

/*header*/
.el-table-plus {
  .el-table-plus--header-wrapper {
    color: $el-table-plus-header-font-color;
    .el-table-plus--header-border-line {
      position: absolute;
      left: 0;
      bottom: 0;
      height: 0;
      border-bottom: $el-table-plus-border-width solid
        $el-table-plus-border-color;
    }
  }
  /*排序*/
  .table-plus-cell--sort {
    .sort-caret {
      &:hover {
        color: $table-plus-font-color;
      }
      &.descending.sort--active {
        border-top-color: $table-plus-primary-color;
      }
      &.ascending.sort--active {
        border-bottom-color: $table-plus-primary-color;
      }
    }
  }
}

.table-plus-header--column {
  position: relative;
  font-weight: $el-table-plus-header-font-weight;
  // user-select: none;
  &.col--ellipsis {
    & > .table-plus-cell {
      display: flex;
      align-items: center;
      .table-plus-cell--title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      & > i,
      & > span {
        &:not(.table-plus-cell--title) {
          flex-shrink: 0;
        }
      }
    }
  }
  .table-plus-cell--required-icon {
    display: inline-block;
    color: $el-table-plus-validate-error-color;
    width: 0.8em;
    height: 1em;
    line-height: 1em;
    font-family: $table-plus-icon-font-family;
    font-weight: normal;
    position: relative;
    &:before {
      content: "*";
      position: absolute;
      left: 0;
      top: 0.2em;
    }
  }
  // .table-plus-cell--required-icon,
  // .table-plus-cell--edit-icon,
  // .table-plus-cell-help-icon,
  // .table-plus-cell--title {
  //   vertical-align: middle;
  // }
  .table-plus-cell--required-icon {
    margin-right: 0.1em;
  }
  .table-plus-cell--edit-icon,
  .table-plus-cell-help-icon {
    margin-right: 0.2em;
  }
  .table-plus-cell-help-icon {
    cursor: help;
  }
  .table-plus-resizable {
    position: absolute;
    right: -7px;
    bottom: 0;
    width: 14px;
    height: 100%;
    text-align: center;
    z-index: 1;
    cursor: col-resize;
    &.is--line {
      &:before,
      &:after {
        content: "";
        display: inline-block;
        vertical-align: middle;
      }
      &:before {
        width: 1px;
        height: 50%;
        background-color: $el-table-plus-resizable-line-color;
      }
      &:after {
        width: 0;
        height: 100%;
      }
    }
  }
}
.el-table-plus--fixed-right-wrapper {
  .table-plus-header--column {
    .table-plus-resizable {
      right: auto;
      left: -7px;
    }
  }
}

/*table*/
.el-table-plus--render-default {
  position: relative;
  font-size: $table-plus-font-size;
  color: $table-plus-font-color;
  direction: ltr;
  .el-table-plus--body-wrapper {
    table {
      background-color: $el-table-plus-body-background-color;
    }
  }
  .el-table-plus--footer-wrapper {
    table {
      background-color: $el-table-plus-footer-background-color;
    }
  }
  .el-table-plus--header,
  .el-table-plus--body,
  .el-table-plus--footer {
    border: 0;
    border-spacing: 0;
    border-collapse: separate;
    table-layout: fixed;
  }
  .el-table-plus--header-wrapper,
  .el-table-plus--footer-wrapper {
    overflow-x: hidden;
    overflow-y: hidden;
  }
  &:not(.is--empty) {
    &.is--footer {
      &.is--scroll-x {
        .el-table-plus--body-wrapper {
          overflow-x: scroll;
        }
      }
    }
  }
  .table-plus-body--row {
    &.row--stripe {
      background-color: $el-table-plus-row-striped-background-color;
    }
    &.row--radio {
      background-color: $el-table-plus-row-radio-checked-background-color;
    }
    &.row--checked {
      background-color: $el-table-plus-row-checkbox-checked-background-color;
    }
    &.row--current {
      background-color: $el-table-plus-row-current-background-color;
    }
    &.row--hover {
      background-color: $el-table-plus-row-hover-background-color;
      &.row--stripe {
        background-color: $el-table-plus-row-hover-striped-background-color;
      }
      &.row--radio {
        background-color: $el-table-plus-row-hover-radio-checked-background-color;
      }
      &.row--checked {
        background-color: $el-table-plus-row-hover-checkbox-checked-background-color;
      }
      &.row--current {
        background-color: $--table-row-hover-background-color;
      }
    }
  }
  // &.is--tree-line {
  //   .table-plus-body--row {
  //     &.row--stripe {
  //       .table-plus-tree--btn-wrapper {
  //         background-color: $el-table-plus-row-striped-background-color;
  //       }
  //     }
  //     &.row--radio {
  //       .table-plus-tree--btn-wrapper {
  //         background-color: $el-table-plus-row-radio-checked-background-color;
  //       }
  //     }
  //     &.row--checked {
  //       .table-plus-tree--btn-wrapper {
  //         background-color: $el-table-plus-row-checkbox-checked-background-color;
  //       }
  //     }
  //     &.row--current {
  //       .table-plus-tree--btn-wrapper {
  //         background-color: $el-table-plus-row-current-background-color;
  //       }
  //     }
  //     &.row--hover {
  //       .table-plus-tree--btn-wrapper {
  //         background-color: $el-table-plus-row-hover-background-color;
  //       }
  //       &.row--stripe {
  //         .table-plus-tree--btn-wrapper {
  //           background-color: $el-table-plus-row-hover-striped-background-color;
  //         }
  //       }
  //       &.row--radio {
  //         .table-plus-tree--btn-wrapper {
  //           background-color: $el-table-plus-row-hover-radio-checked-background-color;
  //         }
  //       }
  //       &.row--checked {
  //         .table-plus-tree--btn-wrapper {
  //           background-color: $el-table-plus-row-hover-checkbox-checked-background-color;
  //         }
  //       }
  //       &.row--current {
  //         .table-plus-tree--btn-wrapper {
  //           background-color: $el-table-plus-row-hover-current-background-color;
  //         }
  //       }
  //     }
  //   }
  // }
  &.drag--resize {
    .el-table-plus--main-wrapper,
    .el-table-plus--fixed-left-wrapper,
    .el-table-plus--fixed-right-wrapper {
      * {
        cursor: col-resize;
      }
    }
  }
  &.drag--range,
  &.drag--area {
    .el-table-plus--main-wrapper,
    .el-table-plus--fixed-left-wrapper,
    .el-table-plus--fixed-right-wrapper {
      * {
        cursor: default;
      }
    }
  }
  &.drag--extend-range {
    .el-table-plus--main-wrapper,
    .el-table-plus--fixed-left-wrapper,
    .el-table-plus--fixed-right-wrapper {
      * {
        cursor: crosshair;
      }
    }
  }
  &.column--highlight {
    .table-plus-header--column {
      &:not(.col--seq) {
        &:hover {
          background-color: $el-table-plus-column-hover-background-color;
        }
      }
    }
  }
  &.cell--area {
    .el-table-plus--main-wrapper {
      user-select: none;
    }
  }
  .table-plus-header--column,
  .table-plus-body--column,
  .table-plus-footer--column {
    position: relative;
    line-height: $el-table-plus-row-line-height;
    text-align: left;
    &:not(.col--ellipsis) {
      padding: $el-table-plus-column-padding-default;
    }
    &.col--current {
      background-color: $el-table-plus-column-current-background-color;
      // .table-plus-tree--btn-wrapper {
      //   background-color: $el-table-plus-column-current-background-color;
      // }
    }
    &.col--center {
      text-align: center;
    }
    &.col--right {
      text-align: right;
    }
  }
  // &.is--tree-line {
  //   .table-plus-header--column,
  //   .table-plus-body--column,
  //   .table-plus-footer--column {
  //     &.col--current {
  //       .table-plus-tree--btn-wrapper {
  //         background-color: $el-table-plus-column-current-background-color;
  //       }
  //     }
  //   }
  // }
  .table-plus-header--column,
  .table-plus-footer--column {
    &.col--ellipsis {
      &.col--center {
        .table-plus-cell {
          justify-content: center;
        }
      }
      &.col--right {
        .table-plus-cell {
          justify-content: flex-end;
        }
      }
    }
  }
  .table-plus-body--column {
    &.col--checkbox {
      user-select: none;
    }
  }

  /*边框*/
  .el-table-plus--footer-wrapper {
    border-top: $el-table-plus-border-width solid $el-table-plus-border-color;
  }
  &.border--default {
    .el-table-plus--border-line {
      display: none;
    }
  }
  &.border--default,
  &.border--full,
  &.border--outer {
    .el-table-plus--header-wrapper {
      background-color: $el-table-plus-header-background-color;
    }
  }
  &.border--default,
  &.border--inner {
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      background-image: linear-gradient(
        $el-table-plus-border-color,
        $el-table-plus-border-color
      );
      background-repeat: no-repeat;
      background-size: 100% $el-table-plus-border-width;
      background-position: right bottom;
    }
  }
  &.border--full {
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      background-image: linear-gradient(
          $el-table-plus-border-color,
          $el-table-plus-border-color
        ),
        linear-gradient(
          $el-table-plus-border-color,
          $el-table-plus-border-color
        );
      background-repeat: no-repeat;
      background-size: $el-table-plus-border-width 100%,
        100% $el-table-plus-border-width;
      background-position: right top, right bottom;
    }
    .el-table-plus--fixed-left-wrapper {
      // border-right: 1px solid $el-table-plus-border-color;
      .table-plus-body--column {
        border-right-color: $el-table-plus-border-color;
      }
    }
  }
  &.border--default,
  &.border--full,
  &.border--outer,
  &.border--inner {
    .el-table-plus--header-wrapper {
      .table-plus-header--row {
        &:last-child {
          .table-plus-header--gutter {
            background-image: linear-gradient(
              $el-table-plus-border-color,
              $el-table-plus-border-color
            );
            background-repeat: no-repeat;
            background-size: 100% $el-table-plus-border-width;
            background-position: right bottom;
          }
        }
      }
    }
  }
  &.border--inner,
  &.border--none {
    .el-table-plus--header-wrapper {
      background-color: $el-table-plus-header-background-color;
    }
    .el-table-plus--fixed-left-wrapper {
      border-right: 0;
    }
  }
  &.border--inner {
    .el-table-plus--border-line {
      border-width: 0 0 1px 0;
    }
  }
  &.border--none {
    .el-table-plus--border-line {
      display: none;
    }
    .el-table-plus--header-border-line {
      display: none;
    }
  }

  &.size--medium {
    font-size: $table-plus-font-size-medium;
    .el-table-plus--empty-placeholder,
    .el-table-plus--empty-block {
      min-height: $el-table-plus-row-height-medium;
    }
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      &:not(.col--ellipsis) {
        padding: $el-table-plus-column-padding-medium;
      }
    }
    .table-plus-cell {
      .table-plus-default-input,
      .table-plus-default-textarea,
      .table-plus-default-select {
        height: $table-plus-input-height-medium;
      }
      .table-plus-default-input {
        &[type="date"]::-webkit-inner-spin-button {
          margin-top: 3px;
        }
      }
    }
  }
  &.size--small {
    font-size: $table-plus-font-size-small;
    .el-table-plus--empty-placeholder,
    .el-table-plus--empty-block {
      min-height: $el-table-plus-row-height-small;
    }
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      &:not(.col--ellipsis) {
        padding: $el-table-plus-column-padding-small;
      }
    }
    .table-plus-cell {
      .table-plus-default-input,
      .table-plus-default-textarea,
      .table-plus-default-select {
        height: $table-plus-input-height-small;
      }
      .table-plus-default-input {
        &[type="date"]::-webkit-inner-spin-button {
          margin-top: 2px;
        }
      }
    }
  }
  &.size--mini {
    font-size: $table-plus-font-size-mini;
    .el-table-plus--empty-placeholder,
    .el-table-plus--empty-block {
      min-height: $el-table-plus-row-height-mini;
    }
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      &:not(.col--ellipsis) {
        padding: $el-table-plus-column-padding-mini;
      }
    }
    .table-plus-cell {
      .table-plus-default-input,
      .table-plus-default-textarea,
      .table-plus-default-select {
        height: $table-plus-input-height-mini;
      }
      .table-plus-default-input {
        &[type="date"]::-webkit-inner-spin-button {
          margin-top: 1px;
        }
      }
    }
  }

  :not(.is--animat) {
    .table-plus-cell {
      .el-checkbox__inner,
      .el-radio__inner {
        transition: none;
        &::after {
          transition: none;
        }
      }
    }
  }

  .table-plus-cell {
    white-space: pre-line;
    word-break: break-all;
    padding-left: $el-table-plus-cell-padding-left;
    padding-right: $el-table-plus-cell-padding-right;

    // .el-checkbox__inner,
    // .el-radio__inner {
    //   transition: none;
    //   &::after {
    //     transition: none;
    //   }
    // }
  }

  // 单元格占位符
  .table-plus-cell--placeholder {
    color: $el-table-plus-cell-placeholder-color;
  }

  // 单选框和复选框
  .table-plus-cell--radio {
    @extend %XERadioIcon;
  }
  .table-plus-cell--checkbox {
    @extend %XECheckboxIcon;
  }

  .fixed--hidden {
    visibility: hidden;
  }
  .el-table-plus--fixed-left-wrapper,
  .el-table-plus--fixed-right-wrapper {
    width: 100%;
    position: absolute;
    top: 0;
    z-index: 5;
    overflow: hidden;
    background-color: inherit;
    transition: 0.3s box-shadow;
    .el-table-plus--body-wrapper {
      overflow-x: hidden;
    }
  }
  .el-table-plus--fixed-left-wrapper {
    .el-table-plus--body-wrapper {
      width: calc(100% + 40px);
    }
  }
  &.is--header {
    .el-table-plus--fixed-left-wrapper,
    .el-table-plus--fixed-right-wrapper {
      .el-table-plus--body-wrapper {
        &:before {
          display: none;
        }
      }
    }
  }
  .el-table-plus--fixed-left-wrapper {
    left: 0;
    width: 200px;
    &.scrolling--middle {
      box-shadow: $el-table-plus-fixed-left-scrolling-box-shadow;
    }
  }
  .el-table-plus--fixed-right-wrapper {
    right: 0;
    &.scrolling--middle {
      box-shadow: $el-table-plus-fixed-right-scrolling-box-shadow;
    }
  }
  .el-table-plus--header-wrapper,
  .el-table-plus--body-wrapper,
  .el-table-plus--footer-wrapper {
    position: relative;
    &.fixed-left--wrapper,
    &.fixed-right--wrapper {
      position: absolute;
      top: 0;
    }
    &.fixed-left--wrapper {
      left: 0;
    }
    &.fixed-right--wrapper {
      right: 0;
      overflow-y: auto;
    }
  }
  .table-plus-body--x-space {
    width: 100%;
    height: 1px;
    margin-bottom: -1px;
  }
  .table-plus-body--y-space {
    width: 0;
    float: left;
  }

  /*列宽线*/
  .el-table-plus--resizable-bar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    z-index: 9;
    cursor: col-resize;
    &:before {
      content: "";
      display: block;
      height: 100%;
      background-color: $el-table-plus-resizable-drag-line-color;
    }
  }

  /*边框线*/
  .el-table-plus--border-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    border: $el-table-plus-border-width solid $el-table-plus-border-color;
  }

  /*树形节点*/
  &.is--tree-line {
    .table-plus-body--row {
      &:first-child {
        .table-plus-tree--line {
          border-width: 0 0 1px 0;
        }
      }
    }
    .table-plus-body--row {
      .table-plus-body--column {
        background-image: none;
      }
    }
  }
  .table-plus-tree--line-wrapper {
    position: relative;
    display: block;
    height: 0;
  }
  .table-plus-tree--line {
    content: "";
    position: absolute;
    bottom: -0.9em;
    width: 0.8em;
    border-width: 0 0 1px 1px;
    border-style: $el-table-plus-tree-node-line-style;
    border-color: $el-table-plus-tree-node-line-color;
    pointer-events: none;
  }
  .table-plus-cell--tree-node {
    position: relative;
  }
  .table-plus-tree--btn-wrapper {
    position: absolute;
    top: 50%;
    width: 1em;
    height: 1em;
    text-align: center;
    transform: translateY(-50%);
    z-index: 1;
    user-select: none;
    cursor: pointer;
  }
  .table-plus-tree--node-btn {
    display: block;
    color: $table-plus-font-lighten-color;
    &:hover {
      color: $table-plus-font-color;
    }
  }
  .table-plus-tree-cell {
    display: block;
    padding-left: 1.5em;
  }
  .table-plus-body--column {
    &.col--ellipsis {
      & > .table-plus-cell {
        .table-plus-tree-cell {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
    }
  }

  /*展开行*/
  .el-table-plus--expanded {
    cursor: pointer;
    .el-table-plus--expand-btn {
      display: inline-block;
      width: 1em;
      height: 1em;
      text-align: center;
      user-select: none;
      color: $table-plus-font-lighten-color;
      &:hover {
        color: $table-plus-font-color;
      }
    }
    & + .el-table-plus--expand-label {
      padding-left: 0.5em;
    }
  }
  .table-plus-body--expanded-column {
    border-bottom: $el-table-plus-border-width solid $el-table-plus-border-color;
    &.col--ellipsis {
      & > .table-plus-body--expanded-cell {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
  .table-plus-body--expanded-cell {
    position: relative;
    z-index: 1;
    &.is--ellipsis {
      overflow: auto;
    }
  }

  /*设置列高度*/
  &.table-plus-editable {
    .table-plus-body--column {
      @extend %DefaultColumnHeight;
      padding: 0;
    }
    &.size--medium {
      .table-plus-body--column {
        @extend %MediumColumnHeight;
      }
    }
    &.size--small {
      .table-plus-body--column {
        @extend %SmallColumnHeight;
      }
    }
    &.size--mini {
      .table-plus-body--column {
        @extend %MiniColumnHeight;
      }
    }
  }

  /*溢出列*/
  .table-plus-header--column,
  .table-plus-body--column,
  .table-plus-footer--column {
    &.col--ellipsis {
      @extend %DefaultColumnHeight;
      padding: 0;
      &:not(.col--actived) {
        & > .table-plus-cell {
          @extend %TextEllipsis;
        }
      }
      & > .table-plus-cell {
        max-height: $el-table-plus-row-height-default;
      }
    }
  }
  &.size--medium {
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      &.col--ellipsis {
        @extend %MediumColumnHeight;
        & > .table-plus-cell {
          max-height: $el-table-plus-row-height-medium;
        }
      }
    }
    .table-plus-cell--checkbox {
      font-size: $table-plus-checkbox-font-size-medium;
    }
    .table-plus-cell--radio {
      font-size: $table-plus-radio-font-size-medium;
    }
  }
  &.size--small {
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      &.col--ellipsis {
        @extend %SmallColumnHeight;
        & > .table-plus-cell {
          max-height: $el-table-plus-row-height-small;
        }
      }
    }
    .table-plus-cell--checkbox {
      font-size: $table-plus-checkbox-font-size-small;
    }
    .table-plus-cell--radio {
      font-size: $table-plus-radio-font-size-small;
    }
  }
  &.size--mini {
    .table-plus-header--column,
    .table-plus-body--column,
    .table-plus-footer--column {
      &.col--ellipsis {
        @extend %MiniColumnHeight;
        & > .table-plus-cell {
          max-height: $el-table-plus-row-height-mini;
        }
      }
    }
    .table-plus-cell--checkbox {
      font-size: $table-plus-checkbox-font-size-mini;
    }
    .table-plus-cell--radio {
      font-size: $table-plus-radio-font-size-mini;
    }
  }

  /*暂无数据*/
  .el-table-plus--empty-placeholder,
  .el-table-plus--empty-block {
    min-height: $el-table-plus-row-height-default;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    width: 100%;
    pointer-events: none;
  }
  .el-table-plus--empty-block {
    display: none;
    visibility: hidden;
  }
  .el-table-plus--empty-placeholder {
    display: none;
    position: absolute;
    top: 0;
    z-index: 5;
  }
  .el-table-plus--empty-content {
    display: block;
    width: 50%;
    pointer-events: auto;
  }
  &.is--empty {
    .el-table-plus--empty-block,
    .el-table-plus--empty-placeholder {
      display: flex;
    }
  }

  .table-plus-body--column {
    &.col--selected {
      box-shadow: inset 0px 0px 0px 2px $table-plus-primary-color;
    }
  }

  /*校验不通过*/
  .table-plus-body--column {
    &.col--actived,
    &.col--selected {
      position: relative;
    }
    &.col--valid-error {
      .table-plus-cell--valid {
        width: 320px;
        position: absolute;
        bottom: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        pointer-events: none;
        z-index: 4;
        .table-plus-cell--valid-msg {
          display: inline-block;
          border-radius: $table-plus-border-radius;
          padding: 8px 12px;
          color: #fff;
          background-color: #f56c6c;
          pointer-events: auto;
        }
      }
      .table-plus-default-input,
      .table-plus-default-textarea,
      .table-plus-default-select {
        border-color: $el-table-plus-validate-error-color;
      }
      .table-plus-input {
        > .table-plus-input--inner {
          border-color: $el-table-plus-validate-error-color;
        }
      }
    }
  }
  .table-plus-body--row {
    &:first-child {
      .table-plus-cell--valid {
        bottom: auto;
        top: calc(100% + 4px);
      }
    }
  }
  .table-plus-body--column {
    &:first-child {
      .table-plus-cell--valid {
        left: 10px;
        transform: translateX(0);
        text-align: left;
      }
    }
  }

  /*单元格编辑状态*/
  .table-plus-body--row {
    &.row--new {
      & > .table-plus-body--column {
        position: relative;
        &:before {
          content: "";
          top: $el-table-plus-cell-dirty-width * -1;
          left: $el-table-plus-cell-dirty-width * -1;
          position: absolute;
          border-width: $el-table-plus-cell-dirty-width;
          border-style: solid;
          border-color: transparent $el-table-plus-cell-dirty-insert-color
            transparent transparent;
          transform: rotate(45deg);
        }
      }
    }
  }
  .table-plus-body--column {
    &.col--dirty {
      position: relative;
      &:before {
        content: "";
        top: $el-table-plus-cell-dirty-width * -1;
        left: $el-table-plus-cell-dirty-width * -1;
        position: absolute;
        border-width: $el-table-plus-cell-dirty-width;
        border-style: solid;
        border-color: transparent $el-table-plus-cell-dirty-update-color
          transparent transparent;
        transform: rotate(45deg);
      }
    }
  }

  /*可编辑*/
  &.table-plus-editable {
    &.cell--highlight {
      .table-plus-body--column {
        &.col--actived {
          box-shadow: inset 0px 0px 0px 2px $table-plus-primary-color;
          &.col--valid-error {
            box-shadow: inset 0px 0px 0px 2px
              $el-table-plus-validate-error-color;
          }
          .table-plus-cell {
            .table-plus-default-input,
            .table-plus-default-textarea {
              border: 0;
              padding: 0;
            }
            .table-plus-default-input {
              height: $el-table-plus-row-line-height;
            }
            .table-plus-input {
              .table-plus-input--inner {
                border: 0;
                padding-left: 0;
              }
            }
            .table-plus-textarea {
              height: $el-table-plus-row-line-height - 1px;
              .table-plus-textarea--inner {
                border: 0;
              }
            }
          }
        }
      }
    }
    .table-plus-body--column {
      padding: 0;
      &.col--actived {
        padding: 0;
      }
    }
  }
}

.el-table-plus--tooltip-wrapper {
  &.el-table-plus--valid-error {
    background-color: #f56c6c;
    color: #fff;
  }
}

/*footer*/
.el-table-plus--footer-wrapper {
  color: $el-table-plus-footer-font-color;
  margin-top: -1px;
  &.body--wrapper {
    overflow-x: auto;
  }
}

.table-plus-footer--column {
  &.col--ellipsis {
    & > .table-plus-cell {
      display: flex;
      align-items: center;
      .table-plus-cell--item {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
}
