添加其它技术分类

This commit is contained in:
Dev
2026-09-23 18:05:15 +08:00
parent a07c495fe0
commit bde6edd76a
5 changed files with 45 additions and 11 deletions
@@ -179,11 +179,15 @@ class Common extends Api
'key' => $key == 0 ? '-1' : $key,
];
}
// 过滤空值,避免配置项为空时返回空字符串标签
$toLabels = function ($value) {
return array_values(array_filter(array_map('trim', explode(',', $value ?? ''))));
};
$config = [
'languageLabels' => explode(',', $code_languages),
'frontLabels' => explode(',', $front_techs),
'backendLabels' => explode(',', $back_techs),
'otherLabels' => explode(',', $other_techs),
'languageLabels' => $toLabels($code_languages),
'frontLabels' => $toLabels($front_techs),
'backendLabels' => $toLabels($back_techs),
'otherLabels' => $toLabels($other_techs),
'developTypes' => $developTypes,
];