/*
 * @Author: 焦质晔
 * @Date: 2020-02-28 22:13:54
 * @Last Modified by: 焦质晔
 * @Last Modified time: 2024-11-05 19:05:13
 */
@use './variable' as *;

.body--column {
  .cell--edit {
    margin: 0 -1 * ($v-module-distance - 1px);
    input.el-input__inner {
      line-height: 1;
    }
    // placeholder
    input::placeholder {
      text-align: left;
    }
    // search-helper
    .search-helper {
      width: calc(100% + 1px);
      .el-input__wrapper {
        position: relative;
        .el-input__suffix {
          position: absolute;
          right: 2px;
          top: 2px;
          bottom: 2px;
          height: auto;
          background-color: #fff;
          .el-input__clear {
            padding: 2px;
            margin: 0;
            box-sizing: content-box;
          }
        }
      }
      .el-input-group__append {
        padding: 0 16px;
        .el-button {
          padding-left: 8px;
          padding-right: 8px;
        }
      }
    }
    // textArea
    textarea[class='el-textarea__inner'] {
      resize: none;
    }
    &.is-error {
      position: relative;
      .el-input__wrapper,
      .el-select__wrapper {
        box-shadow: 0 0 0 1px $v-danger-color inset;
        z-index: 1;
      }
      .search-helper {
        & + .cell-error {
          right: 38px;
        }
      }
      .cell-error {
        position: absolute;
        top: calc(50% - 9px);
        font-size: $v-font-size-small;
        color: $v-danger-color;
        right: 8px;
        pointer-events: none;
        z-index: 1;
      }
    }
  }
  &.col--center {
    .cell--edit .el-input__inner {
      text-align: center;
    }
  }
  &.col--right {
    .cell--edit .el-input__inner {
      text-align: right;
    }
  }
  &.selected {
    background-color: $v-table-row-selected-background-color !important;
  }
}
