@mixin textEllipsis($lineNum) {
  @if $lineNum == 1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  } @else {
    display: -webkit-box;
    word-break: break-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $lineNum; //需要显示的行数
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
// 使用示例:
// @include textEllipsis(1);
// @include textEllipsis(2);
