global.less 4.05 KB
@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
  overflow: hidden;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 浏览器滚动条相关 */
::-webkit-scrollbar-thumb {
  height: 50px;
  background: rgba(160, 160, 160, 0.8);
  border-radius: 3px;
  transition: background 1s;
  &:hover {
    background: rgba(160, 160, 160, 1);
  }
}
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}
.mt-5 {
  margin-top: 5px !important;
}
.mt-10 {
  margin-top: 10px !important;
}
.mt-15 {
  margin-top: 15px !important;
}
.mt-20 {
  margin-top: 20px !important;
}
.mt-24 {
  margin-top: 24px !important;
}

.ml-5 {
  margin-left: 5px !important;
}
.ml-10 {
  margin-left: 10px !important;
}
.ml-15 {
  margin-left: 15px !important;
}
.ml-20 {
  margin-left: 20px !important;
}

.mr-5 {
  margin-right: 5px !important;
}
.mr-10 {
  margin-right: 10px !important;
}
.mr-15 {
  margin-right: 15px !important;
}
.mr-20 {
  margin-right: 20px !important;
}
.mr-30 {
  margin-right: 30px !important;
}

.mb-5 {
  margin-bottom: 5px !important;
}
.mb-10 {
  margin-bottom: 10px !important;
}
.mb-15 {
  margin-bottom: 15px !important;
}
.mb-20 {
  margin-bottom: 20px !important;
}

.tn-l {
  text-align: left;
}
.tn-c {
  text-align: center;
}
.tn-r {
  text-align: right;
}
.ft-24 {
  font-size: 24px;
}
.color-gray {
  color: rgba(0, 0, 0, 0.35);
}
.color-primary {
  color: @primary-color !important;
}

// 清除上下浮动
.clearfix {
  &::before,
  &::after {
    content: ' ';
    display: table;
  }
  &::after {
    clear: both;
  }
}
.left {
  float: left;
}
.right {
  float: right;
}
.fn-hide {
  display: none !important;
}
// 单行字体溢出时显示省略号
.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pointer {
  cursor: pointer;
  &:hover {
    color: #40a9ff;
  }
}
.wflex_r_s {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.c9 {
  color: #999 !important;
}

:global {
  .ant-table-wrapper {
    .ant-table-pagination.ant-pagination {
      margin-top: 24px;
      margin-bottom: 0px;
      justify-content: flex-end;
    }
  }
  .ant-pro-basicLayout-content {
    margin: 0px;
  }
  .ant-tooltip-inner {
    .anticon {
      margin-right: 6px;
    }
  }
}

/* 权限相关样式 */
.view-tree-auth {
  :global {
    .ant-tree {
      position: relative;
      top: 3px;
    }
    .info-tree {
      .ant-tree-list {
        .ant-tree-treenode {
          .ant-tree-node-content-wrapper {
            .ant-tree-title {
              span {
                display: none;
                &:hover {
                  opacity: 0.8;
                }
                &:first-child {
                  color: #185da2;
                }
                &:last-child {
                  color: #666;
                }
              }
              &:hover {
                span {
                  display: inline-block;
                }
              }
            }
          }
        }
      }
    }
  }
}

.box-info {
  min-height: calc(~'100vh - 112px');
  :global {
    .ant-card {
      min-height: calc(~'100vh - 195px');
      margin-bottom: 70px;
      .footer-btn {
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 10;
        width: 100%;
        height: 56px;
        line-height: 56px;
        margin-bottom: 0;
        text-align: center;
        background-color: #fff;
        box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.03);
      }
    }
  }
}