index.less 4.31 KB
@import '~antd/es/style/themes/default.less';

// 快捷查询样式
.qx-view-quick-search {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: all 0.5s;

  &-container {
    position: relative;
    box-sizing: border-box;
    padding: 0 20px;
    overflow: hidden;

    .ant-btn-icon-only {
      position: absolute;
      top: 0;
      bottom: 0;
      z-index: 2;
      width: 18px;
      background-color: #fff;

      &.left-button {
        left: 0;
        .anticon {
          justify-content: flex-start;
        }
      }

      &.right-button {
        right: 0;
        .anticon {
          justify-content: flex-end;
        }
      }
    }

    ::-webkit-scrollbar {
      height: 0;
    }
    ::-webkit-scrollbar-thumb {
      height: 0;
    }
  }

  &__item {
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    height: 32px;
    padding-right: 20px;
    padding-bottom: 2px;
    padding-left: 20px;
    color: #333;
    font-size: 14px;
    line-height: 30px;
    white-space: nowrap;

    &:last-child {
      padding-right: 0;
    }

    &:first-child {
      padding-left: 0;
    }

    &::before {
      position: absolute;
      right: 20px;
      bottom: 0;
      left: 20px;
      display: none;
      height: 2px;
      background-color: @primary-color;
      content: '';
    }

    &:last-child::before {
      right: 0;
    }

    &:first-child::before {
      left: 0;
    }

    &:hover,
    &.selected {
      color: @primary-color;
      cursor: pointer;
    }

    &.selected::before {
      display: block;
    }
  }
}

// 树状视图样式
.qx-tree-list {
  height: 100%;

  .ant-tree {
    height: calc(100% - 40px);
    padding-top: 10px;
    overflow-y: scroll;

    .ant-tree-switcher-icon {
      color: #999;
    }
  }

  .ant-tree-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    color: #333;
    font-size: 14px;
  }

  .ant-tree-treenode {
    align-items: center;
    height: 32px;

    .ant-tree-node-content-wrapper {
      align-items: center;
      justify-content: flex-start;
      height: 100%;
    }

    button {
      //height: 28px;
      width: auto;
      min-width: 28px;
      margin: 0 12px 0 0;
      padding: 0;
    }

    .qx-tree-btn-list {
      display: none;
      align-items: center;
      justify-content: flex-start;
      height: 100%;
      margin-left: 16px;

      .qx-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 0 5px;
        background-color: transparent !important;
      }

      .qx-btn:hover,
      .qx-btn:focus {
        background-color: #f0f0f0 !important;
      }
    }

    .ant-tree-draggable-icon {
      visibility: hidden;
    }

    &:hover {
      .qx-tree-btn-list {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
      }

      .ant-tree-draggable-icon {
        color: @normal-color;
        font-size: 18px;
        visibility: visible;
        cursor: move;
        opacity: 1;
      }
    }

    .ant-tree-draggable-icon:hover {
      color: @primary-color;
      opacity: 1;
    }

    &.ant-tree-treenode-draggable.dragging {
      background-color: #fff;
      border-color: transparent !important;
      border-radius: 3px;
      box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);

      &::after {
        border-color: transparent !important;
      }
    }
  }

  .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
    background-color: transparent;
  }

  .ant-tree .ant-tree-node-content-wrapper:hover {
    background-color: rgba(52, 153, 255, 0.05);
    border-radius: 3px;
  }

  &__empty {
    height: 200px;
    margin: 0;
    padding-top: 30px;
    background-color: #fff;
  }

  .qx-tree-drop-down {
    &-btn.ant-btn {
      height: 24px;
      color: #999;

      &:hover {
        color: @primary-color;
      }
    }

    .qx-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      padding: 0 5px;
      background-color: transparent !important;
    }

    .qx-btn:hover,
    .qx-btn:focus {
      background-color: #f0f0f0 !important;
    }

    .ant-dropdown-menu-item {
      &-active,
      &:hover {
        background-color: #fff;
      }
    }
  }
}