king
2023-05-18 e9e8b1c7b481415714fff9a0d83099fd5a7d6ff0
src/menu/components/table/normal-table/columns/index.scss
@@ -1,8 +1,72 @@
.normal-table-columns {
  position: relative;
  --mk-table-border-color: #e8e8e8;
  --mk-table-color: rgba(0, 0, 0, 0.65);
  --mk-table-font-size: 14px;
  --mk-table-font-weight: normal;
  .ant-table {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
  }
  .ant-table-selection-column {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
  }
  .ant-table-body {
    overflow-x: auto;
    padding-bottom: 20px;
    tr {
      td {
        background: #ffffff;
        .col-copy {
          margin-bottom: 0;
          display: inline-block;
          color: inherit;
          .ant-typography-copy {
            position: absolute;
            left: 2px;
            top: 0px;
            margin-left: 0px;
            font-size: 12px;
            opacity: 0;
            transition: opacity 0.2s;
          }
        }
      }
      td:hover .col-copy {
        .ant-typography-copy {
          opacity: 1;
        }
      }
      td:not(.ant-table-selection-column) {
        position: relative;
        padding: 12px 8px;
        >.profile {
          position: absolute;
          top: 2px;
          right: 2px;
          color: purple;
          font-size: 12px;
        }
        >.close-col {
          position: absolute;
          top: 2px;
          right: 2px;
          color: orange;
          font-size: 12px;
        }
        >.profile + .close-col {
          right: 20px;
        }
      }
    }
    tr:hover td {
      background: #ffffff!important;
    }
  }
  .ant-table-thead {
    th {
      position: relative;
@@ -15,11 +79,65 @@
        content: '';
      }
    }
    > tr > th .ant-table-column-sorter .ant-table-column-sorter-inner {
      .ant-table-column-sorter-up.on, .ant-table-column-sorter-down.on {
        color: unset;
    > tr > th {
      padding: 12px 8px;
      .ant-table-column-sorter .ant-table-column-sorter-inner {
        .ant-table-column-sorter-up.on, .ant-table-column-sorter-down.on {
          color: unset;
        }
      }
    }
  }
  .col-control {
    position: absolute;
    z-index: 2;
    right: 0;
    top: -25px;
    >.anticon, >div > .anticon {
      font-size: 16px;
      margin-right: 10px;
      cursor: pointer;
    }
    >.anticon-copy {
      color: #26C281;
    }
    >.anticon-delete {
      color: #ff4d4f;
    }
    >.anticon-file-sync {
      color: #1890ff;
    }
    >div >.profile {
      color: purple;
    }
  }
  .ant-table-small > .ant-table-content > .ant-table-body {
    margin: 0;
  }
  .ant-table-small.ant-table-bordered {
    border-right: 1px solid #e8e8e8;
  }
  table, tr, th, td, .ant-table-small {
    border-color: var(--mk-table-border-color)!important;
  }
  table tr {
    th .ant-table-column-title {
      font-size: var(--mk-table-font-size)!important;
      font-weight: var(--mk-table-font-weight)!important;
    }
    td {
      font-size: var(--mk-table-font-size)!important;
      font-weight: var(--mk-table-font-weight)!important;
    }
  }
  table tbody tr {
    color: var(--mk-table-color);
  }
}
.normal-table-columns:not(.ghost) {
  .ant-table-small > .ant-table-content .ant-table-thead > tr > th {
    background-color: #fafafa!important;
  }
}
.normal-table-columns.false {
@@ -38,3 +156,29 @@
    border-radius: 0;
  }
}
.normal-table-columns.ghost {
  .ant-table-thead > tr {
    > th {
      color: inherit;
      background: transparent;
      .ant-table-column-sorter .ant-table-column-sorter-inner {
        color: inherit;
      }
    }
    > th:hover {
      background: transparent;
    }
  }
  .ant-table-body {
    overflow-x: auto;
    tr {
      td {
        background: transparent;
      }
    }
    tr:hover td {
      background: transparent!important;
    }
  }
}