Skip to content

Commit 8b5e9cd

Browse files
committed
feat: 技术列表改 grid 多列,同类目里多个技术同行展示
技术列表从单列纵向堆叠改成 grid 自适应布局,每个 chip 最小宽度 140px,popup 默认宽度下能横着塞下 2~3 列,30 条技术从 ~960px 高度压到 ~320px,长列表不用再下拉很远。chip 缩到 18px 色块 + 4px 圆角,行高 ~28px。 将版本号提升到 1.3.63。
1 parent 74bc063 commit 8b5e9cd

2 files changed

Lines changed: 36 additions & 38 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stackprism",
33
"private": true,
4-
"version": "1.3.62",
4+
"version": "1.3.63",
55
"type": "module",
66
"description": "StackPrism 用于检测网页前端、后端、CDN、SaaS、广告营销、统计、登录、支付、网站程序和主题模板线索。",
77
"scripts": {

src/ui/popup/Popup.vue

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,24 @@
119119
<span>{{ group.category }}</span>
120120
<span class="count">{{ group.items.length }} 项</span>
121121
</h2>
122-
<button
123-
v-for="tech in group.items"
124-
:key="`${tech.name}|${tech.category}`"
125-
type="button"
126-
class="tech-row"
127-
:title="`查看 ${tech.name} 详情`"
128-
@click="openTechDetail(tech)"
129-
>
130-
<span :class="['tech-chip', techChipClass(tech)]" aria-hidden="true">{{ techInitial(tech) }}</span>
131-
<span class="tech-row-name">{{ tech.name }}</span>
132-
<span
133-
:class="['confidence-dot', confidenceClass(tech.confidence)]"
134-
:title="`${tech.confidence}置信度`"
135-
aria-hidden="true"
136-
></span>
137-
</button>
122+
<div class="tech-grid">
123+
<button
124+
v-for="tech in group.items"
125+
:key="`${tech.name}|${tech.category}`"
126+
type="button"
127+
class="tech-row"
128+
:title="`查看 ${tech.name} 详情`"
129+
@click="openTechDetail(tech)"
130+
>
131+
<span :class="['tech-chip', techChipClass(tech)]" aria-hidden="true">{{ techInitial(tech) }}</span>
132+
<span class="tech-row-name">{{ tech.name }}</span>
133+
<span
134+
:class="['confidence-dot', confidenceClass(tech.confidence)]"
135+
:title="`${tech.confidence}置信度`"
136+
aria-hidden="true"
137+
></span>
138+
</button>
139+
</div>
138140
</section>
139141
</section>
140142
</Transition>
@@ -1626,33 +1628,29 @@
16261628
text-transform: none;
16271629
}
16281630
1629-
// 紧凑技术行:整行 button,左侧色块图标 + 名字 + 右侧置信度小点。
1630-
// hairline 用 ::before 自绘 1px 横线,避免 border 让 hover 高亮看起来错位。
1631+
// 同类目里多个技术按 grid 排开:每个单元宽度自适应 140px+,popup 默认宽度下能塞下 2~3 列
1632+
.tech-grid {
1633+
display: grid;
1634+
gap: 4px;
1635+
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
1636+
}
1637+
1638+
// 单个技术 chip:色块图标 + 名字 + 置信度状态点
16311639
.tech-row {
16321640
align-items: center;
16331641
background: transparent;
16341642
border: 0;
1643+
border-radius: 5px;
16351644
color: var(--text);
16361645
cursor: pointer;
16371646
display: grid;
16381647
font: inherit;
1639-
gap: 10px;
1640-
grid-template-columns: 22px 1fr auto;
1641-
padding: 7px 10px;
1642-
position: relative;
1648+
gap: 6px;
1649+
grid-template-columns: 18px 1fr 7px;
1650+
min-width: 0;
1651+
padding: 4px 8px;
16431652
text-align: left;
16441653
transition: background 0.15s ease;
1645-
width: 100%;
1646-
1647-
+ .tech-row::before {
1648-
background: var(--tech-divider);
1649-
content: '';
1650-
height: 1px;
1651-
left: 10px;
1652-
position: absolute;
1653-
right: 10px;
1654-
top: 0;
1655-
}
16561654
16571655
&:hover {
16581656
background: var(--accent-soft);
@@ -1677,17 +1675,17 @@
16771675
.tech-chip {
16781676
align-items: center;
16791677
background: var(--tech-chip-bg, var(--accent));
1680-
border-radius: 5px;
1678+
border-radius: 4px;
16811679
color: #fff;
16821680
display: inline-flex;
16831681
flex-shrink: 0;
16841682
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
1685-
font-size: 11px;
1683+
font-size: 10px;
16861684
font-weight: 600;
1687-
height: 22px;
1685+
height: 18px;
16881686
justify-content: center;
16891687
line-height: 1;
1690-
width: 22px;
1688+
width: 18px;
16911689
16921690
&.tech-chip-blue {
16931691
--tech-chip-bg: #4f7ab8;

0 commit comments

Comments
 (0)