Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions ui/src/views/RankList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ import UserPanel from "@/components/UserPanel.vue";
import { getRankList, getAiSummarizes } from "@/api/rank.js";
import moment from "moment";
import { Robot } from "@icon-park/vue";
import { set } from 'vue';
export default {
name: "App",
components: {
Expand Down Expand Up @@ -674,10 +673,12 @@ body {
}

.news-title-group {
display: flex;
align-items: center;
gap: 10px;
display: grid;
grid-template-columns: 96px minmax(0, 1fr);
align-items: start;
column-gap: 10px;
flex: 1;
min-width: 0;
}

.news-tag {
Expand All @@ -686,6 +687,13 @@ body {
padding: 2px 8px;
border-radius: 3px;
font-size: 12px;
width: 96px;
max-width: 96px;
box-sizing: border-box;
overflow: hidden;
white-space: nowrap;
text-align: center;
text-overflow: ellipsis;
}

.news-title {
Expand All @@ -694,6 +702,11 @@ body {
font-weight: 500;
color: var(--text-color);
line-height: 1.4;
min-width: 0;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
Comment on lines +707 to +709

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In many build environments (especially Vue 2 projects using Webpack and Autoprefixer), Autoprefixer will automatically strip the -webkit-box-orient: vertical property during the production build because it considers it redundant or non-standard.

To prevent Autoprefixer from removing this property and breaking the multi-line truncation, you should wrap it with Autoprefixer control comments.

  display: -webkit-box;
  /* autoprefixer: ignore next */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

}

.news-content {
Expand Down Expand Up @@ -882,6 +895,7 @@ body {

.news-title-group {
width: 100%;
grid-template-columns: 72px minmax(0, 1fr);
}

.news-title {
Expand All @@ -897,6 +911,8 @@ body {
.news-tag {
font-size: 11px;
padding: 1px 6px;
width: 72px;
max-width: 72px;
}
}

Expand Down Expand Up @@ -1023,4 +1039,4 @@ body {
.tab-news-section {
transition: opacity 0.3s ease;
}
</style>
</style>