|
119 | 119 | <span>{{ group.category }}</span> |
120 | 120 | <span class="count">{{ group.items.length }} 项</span> |
121 | 121 | </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> |
138 | 140 | </section> |
139 | 141 | </section> |
140 | 142 | </Transition> |
|
1626 | 1628 | text-transform: none; |
1627 | 1629 | } |
1628 | 1630 |
|
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:色块图标 + 名字 + 置信度状态点 |
1631 | 1639 | .tech-row { |
1632 | 1640 | align-items: center; |
1633 | 1641 | background: transparent; |
1634 | 1642 | border: 0; |
| 1643 | + border-radius: 5px; |
1635 | 1644 | color: var(--text); |
1636 | 1645 | cursor: pointer; |
1637 | 1646 | display: grid; |
1638 | 1647 | 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; |
1643 | 1652 | text-align: left; |
1644 | 1653 | 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 | | - } |
1656 | 1654 |
|
1657 | 1655 | &:hover { |
1658 | 1656 | background: var(--accent-soft); |
|
1677 | 1675 | .tech-chip { |
1678 | 1676 | align-items: center; |
1679 | 1677 | background: var(--tech-chip-bg, var(--accent)); |
1680 | | - border-radius: 5px; |
| 1678 | + border-radius: 4px; |
1681 | 1679 | color: #fff; |
1682 | 1680 | display: inline-flex; |
1683 | 1681 | flex-shrink: 0; |
1684 | 1682 | font-family: ui-monospace, SFMono-Regular, Consolas, monospace; |
1685 | | - font-size: 11px; |
| 1683 | + font-size: 10px; |
1686 | 1684 | font-weight: 600; |
1687 | | - height: 22px; |
| 1685 | + height: 18px; |
1688 | 1686 | justify-content: center; |
1689 | 1687 | line-height: 1; |
1690 | | - width: 22px; |
| 1688 | + width: 18px; |
1691 | 1689 |
|
1692 | 1690 | &.tech-chip-blue { |
1693 | 1691 | --tech-chip-bg: #4f7ab8; |
|
0 commit comments