+
{
+ if (apps.length === 0) return;
+ setCollapsedCats((prev) => {
+ const next = new Set(prev);
+ if (next.has(category)) next.delete(category);
+ else next.add(category);
+ return next;
+ });
+ }}
+ title={apps.length === 0 ? '该分组暂无应用' : collapsed ? '展开分组' : '折叠分组'}
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: 4,
+ padding: '6px 10px',
+ fontSize: 12,
+ color: 'rgba(0,0,0,0.45)',
+ cursor: apps.length === 0 ? 'default' : 'pointer',
+ userSelect: 'none',
+ borderRadius: 4,
+ transition: 'background 0.2s',
+ }}
+ onMouseEnter={(e) => {
+ if (apps.length > 0) e.currentTarget.style.background = 'rgba(0,0,0,0.03)';
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.background = 'transparent';
+ }}
+ >
+
+ {category}
+
+ {apps.length}
+
+
+ {!collapsed && (
+
+ )}
+
+ );
+ })
) : (
marketByGroup.map(({ group, apps }) => (