table.scss 7.3 KB
/* pages/components/table/table.wxss */
.text-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-header {
  display: flex;
  position: relative;
  align-items: center;
  color: #757980;
  font-size: 24rpx;
  z-index: 8;
  background: #f2f6ff;
  // margin: var(--fontSize8) 0;
}

.table {
  .label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    position: sticky;
    left: 0;
    height: 68rpx;
    width: var(--fontSize232);
    padding: var(--fontSize20);
    z-index: 10;
    background: #f2f6ff;
  }

}


.table .values {
  display: flex;
  // font-size: var(--fontSize24);
  // color: #666666;
}

.table .values .value {
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  height: 68rpx;
  margin-left: var(--fontSize10);
  // background: #f9f9fa;
  // border-radius: var(--fontSize8);
  // font-size: var(--fontSize22);
  position: relative;
}

.table .values .value .label {
  display: flex;
  flex-direction: column;
}

.table .values .value .label .unit {
  font-size: var(--fontSize20);
}

.table .values .value .sort-list {
  display: flex;
  flex-direction: column;
  margin-left: var(--fontSize7);
}

.table .values .value .sort-list>view {
  border: var(--fontSize6) solid transparent;
}

.table .values .value .sort-list .up {
  border-bottom-color: #999;
  margin-bottom: var(--fontSize6);
}

.table .values .value .sort-list .down {
  border-top-color: #999;
}

.table .values .value.active {
  color: #347BFF;
}

.table .values .value.active .sort-list .up.sort-active {
  border-bottom-color: #347BFF;
}

.table .values .value.active .sort-list .down.sort-active {
  border-top-color: #347BFF;
}

.table-total {
  position: relative;
  display: flex;
  height: var(--fontSize60);
  background-color: #eff5fe;
}

.table-total.averageTotal {
  border-top: 1px solid #fff;
}

.table-total .totalLabel {
  flex-shrink: 0;
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  width: var(--fontSize232);
  box-sizing: border-box;
  padding: 0 var(--fontSize20);
  z-index: 8;
  color: #333;
  font-size: var(--fontSize28);
  background-color: #eff5fe;
}

.table-total .totalLabel.average {
  font-size: var(--fontSize22);
  color: #333;
  font-weight: 600;
}

.table-total .values {
  display: flex;
}

.table-total .values .th {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fontSize28);
  color: #333;
  margin-left: var(--fontSize10);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

}

.table .table-body .th {
  position: relative;
  align-items: center;
  display: flex;
  border-bottom: var(--fontSize2) solid rgba(195, 195, 195, 0.3);
}


.table .table-body .th:last-of-type {
  border-bottom: none;
}

.table .table-body .th .name {
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 8;
  background-color: #fff;
  box-sizing: border-box;
  height: var(--fontSize94);
  width: var(--fontSize232);
  padding: var(--fontSize20) var(--fontSize20);
  font-size: var(--fontSize20);
  color: #666666;
  box-shadow: 4px 0 4px -3px #0000000f;
  // box-shadow: 0 0 8rpx 0 #0000000f;
}

.table .table-body .th .name .labelName {
  height: var(--fontSize58);
  box-sizing: border-box;
  word-break: break-all;
  display: -webkit-box;
  text-overflow: ellipsis;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.table .table-body .th .labelName.oneLine {
  line-height: var(--fontSize58);
}

.table .table-body .th .values .td {
  font-size: var(--fontSize28);
  color: #333333;
  width: var(--fontSize130);
  height: var(--fontSize94);
  margin-left: var(--fontSize10);


}

.table-tips {
  padding: var(--fontSize30) 0;
  text-align: center;
  font-size: var(--fontSize20);
  color: #666666;
}

.nothing {
  padding: var(--fontSize30) 0;
  text-align: center;
  font-size: var(--fontSize28);
  color: #666666;
}

.table {
  display: block;
  position: relative;
  overflow: scroll;
  width: 100%;
  height: 100%;
  // height: 800rpx;

}

.table__head {
  height: var(--fontSize96);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--fontSize88);
  font-size: var(--fontSize24);
  line-height: var(--fontSize88);
  color: #aaabbd;
  background-color: #f8f8f8;
  border-bottom: var(--fontSize2) solid #ecf1f8;
  background-color: #fff;
  white-space: nowrap;
  display: flex;
}

.table-box {
  background: #FFFFFF;
  // border: var(--fontSize2) solid #F3F3F3;
  // border-radius: var(--fontSize16);
}

.table__head__td {
  width: var(--fontSize200);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color: #fff;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
}

.table__head__td:nth-child(1) {
  padding-left: var(--fontSize24);
  width: var(--fontSize260);
  margin-right: var(--fontSize40);
  position: sticky;
  z-index: 101;
  left: 0;
}

.table__head__td__text {
  display: inline;
}

.table__row {
  position: relative;
  height: var(--fontSize96);
  white-space: nowrap;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-bottom: var(--fontSize2) solid #ecf1f8;
}

.table__row__td {
  overflow: scroll;
  white-space: nowrap;
  width: var(--fontSize200);
  display: inline-block;
  background-color: #fff;
  box-sizing: border-box;
  font-size: var(--fontSize26);
  line-height: var(--fontSize96);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
}

.table__row__td:nth-child(1) {
  margin-right: var(--fontSize40);
  padding-left: var(--fontSize24);
  width: var(--fontSize260);
  position: sticky;
  z-index: 10;
  left: 0;
}

.indicator {
  width: 710rpx;
  // height: 252rpx;
  border-radius: 16rpx;
  opacity: 1;
  background: #ffffff;
  box-sizing: border-box;
  margin-top: 24rpx;
  padding: 32rpx;

  .header {
    display: flex;
    align-items: center;

    .left {
      color: #181a1f;
      font-size: 32rpx;
      font-weight: 500;
    }
  }

  .tips {
    color: #999ea8;
    margin-top: 8rpx;
  }

  .list {
    margin-top: 16rpx;
    display: flex;
    align-items: center;
    box-sizing: border-box;


    .item {
      width: 40%;

      .top {
        color: #757b85;
        margin-bottom: 14rpx;
      }

      .bottom {
        color: #292d33;

        .num {
          font-size: 40rpx;
          font-family: "numberBold";
        }

        .unit {
          margin-left: 4rpx;
        }
      }

      // df
    }

    .last {
      width: 20%;
    }
  }
}

.showMore {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  // padding: 0 56rpx;
  width: 260rpx;
  height: 56rpx;
  border-radius: 40rpx;
  // opacity: 1;
  margin: 16rpx auto;
  border: 1rpx solid #c3c3c3;
  color: #6379a9;
  font-size: 24rpx;

  .icon {
    width: 32rpx;
    height: 32rpx;
    margin-left: 8rpx;
  }
}