feat: 首页数量徽章改为紧跟组名

- 徽章从标题行最右改为紧跟组名右侧
- nf-head徽章入标题内; h3/全部工具去两端对齐改紧邻
- 内联样式竖直居中, 绿色圆角一致

验证: 全部工具gap8px远离右缘, 视觉7/11紧跟组名 ✓

CHANGELOG记录
This commit is contained in:
personal82555 committed 2026-10-13 17:57:07 +08:00
1 parent c842c3589a
commit d9905c9250
2 files changed
+21 -14

No files matched your search

+7
View File
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. See [standa
## Version 2026.10.12-it-tools-pro
### 🔢 数量徽章改为紧跟组名
- 首页各组数量徽章从「标题行最右」改为**紧跟组名显示**(组名右侧紧邻)
- nf-head 组:徽章放进标题内(组名后);h3 组与全部工具:去掉两端对齐改紧邻排列
- 徽章内联样式(inline-block、竖直居中、左间距 5px),绿色圆角保持一致
- 验证:全部工具徽章距组名 8px、badgeRight 远离容器右缘;视觉确认 7/11 紧跟组名 ✓
### 🔢 首页所有组右侧显示功能数量
- 首页每个工具组标题右侧统一加**绿色圆角数量徽章**:精选推荐、近期新功能、最近使用、我的收藏、新增工具、全部工具
- `nf-head` 组用 `margin-left:auto` 靠右;h3 组改弹性两端对齐(左标签 + 右徽章)
+14 -14
View File
@@ -124,9 +124,8 @@ function onUpdateFavoriteTools() {
<!-- 精选推荐(管理后台配置,置顶独立列表) -->
<div v-if="recoList.length" class="nf-block reco-block">
<div class="nf-head">
<span class="nf-title">⭐ 精选推荐</span>
<span class="nf-title">⭐ 精选推荐 <em class="nf-count">{{ recoList.length }}</em></span>
<span class="nf-sub">为您精选的实用工具,管理员持续更新</span>
<span class="nf-count">{{ recoList.length }}</span>
</div>
<div class="nf-grid">
<RouterLink v-for="f in recoList" :key="f.path" :to="f.path" class="nf-card reco-card">
@@ -142,9 +141,8 @@ function onUpdateFavoriteTools() {
<!-- 近期新功能 -->
<div class="nf-block">
<div class="nf-head">
<span class="nf-title">🆕 近期新功能</span>
<span class="nf-title">🆕 近期新功能 <em class="nf-count">{{ newFeatures.length }}</em></span>
<span class="nf-sub">持续更新中,登录后数据云端同步、授权跟随账号</span>
<span class="nf-count">{{ newFeatures.length }}</span>
</div>
<div class="nf-grid">
<RouterLink v-for="f in newFeatures" :key="f.path" :to="f.path" class="nf-card">
@@ -243,28 +241,30 @@ function onUpdateFavoriteTools() {
</template>
<style scoped lang="less">
// 首页各组右侧数量徽章(统一绿色圆角)
// 首页各组数量徽章:紧跟组名显示(统一绿色圆角)
.nf-count,
.grp-count {
margin-left: auto;
min-width: 26px;
padding: 1px 9px;
display: inline-block;
min-width: 22px;
padding: 0 7px;
border-radius: 999px;
background: rgba(24, 160, 88, 0.15);
color: #18a058;
font-size: 12.5px;
font-size: 12px;
font-weight: 700;
text-align: center;
flex-shrink: 0;
line-height: 1.5;
line-height: 1.7;
font-style: normal;
margin-left: 5px;
vertical-align: middle;
}
// h3 组标题:左标签 + 右数量 两端对齐
// h3 组标题:标签 + 数量 紧邻
.grp-h3 {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
gap: 8px;
> span:first-child {
display: flex;
@@ -280,7 +280,7 @@ function onUpdateFavoriteTools() {
.all-tools-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
cursor: pointer;
user-select: none;
padding: 7px 8px;