mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-14 03:52:26 +08:00
Merge pull request #7983 from hutututtt/fix/account-group-names
fix(frontend): show full account group names
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="groups && groups.length > 0" class="relative max-w-56">
|
||||
<!-- 分组容器:固定最大宽度,最多显示2行 -->
|
||||
<div class="flex flex-wrap gap-1 max-h-14 overflow-hidden">
|
||||
<!-- 限制列宽但不裁切行高,完整显示分组名称和 +N 按钮 -->
|
||||
<div class="flex flex-wrap gap-1">
|
||||
<GroupBadge
|
||||
v-for="group in displayGroups"
|
||||
:key="group.id"
|
||||
@@ -10,7 +10,8 @@
|
||||
:subscription-type="group.subscription_type"
|
||||
:rate-multiplier="group.rate_multiplier"
|
||||
:show-rate="false"
|
||||
class="max-w-24"
|
||||
:truncate="false"
|
||||
class="min-w-0 max-w-full"
|
||||
/>
|
||||
<!-- 更多数量徽章 -->
|
||||
<button
|
||||
@@ -61,6 +62,8 @@
|
||||
:subscription-type="group.subscription_type"
|
||||
:rate-multiplier="group.rate_multiplier"
|
||||
:show-rate="false"
|
||||
:truncate="false"
|
||||
class="min-w-0 max-w-full"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<!-- Platform logo -->
|
||||
<PlatformIcon v-if="platform" :platform="platform" size="sm" />
|
||||
<!-- Group name -->
|
||||
<span class="truncate">{{ name }}</span>
|
||||
<span :class="truncate ? 'truncate' : 'min-w-0 whitespace-normal [overflow-wrap:anywhere]'">{{ name }}</span>
|
||||
<!-- Right side label -->
|
||||
<span v-if="showLabel" :class="labelClass">
|
||||
<template v-if="hasCustomRate">
|
||||
@@ -45,6 +45,8 @@ interface Props {
|
||||
peakEnd?: string
|
||||
peakRateMultiplier?: number
|
||||
showRate?: boolean
|
||||
/** Allow full group names to wrap in layouts that have room for multiple lines. */
|
||||
truncate?: boolean
|
||||
daysRemaining?: number | null // 剩余天数(订阅类型时使用)
|
||||
/**
|
||||
* 订阅分组默认在右侧 label 展示"订阅"或剩余天数;
|
||||
@@ -57,6 +59,7 @@ interface Props {
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
subscriptionType: 'standard',
|
||||
showRate: true,
|
||||
truncate: true,
|
||||
daysRemaining: null,
|
||||
userRateMultiplier: null,
|
||||
peakRateEnabled: false,
|
||||
|
||||
Reference in New Issue
Block a user