perf: 插件全局配置支持下拉选项自定义映射功能

This commit is contained in:
xiaojunnuo
2026-06-01 09:31:38 +08:00
parent 55f75c6051
commit c637985575
9 changed files with 145 additions and 6 deletions
@@ -57,6 +57,18 @@ export class PluginGroups {
for (const plugin of groups[key].plugins) {
if (plugin.sysSetting) {
merge(plugin.input, plugin.sysSetting.metadata?.input || {});
// 应用选项映射
for (const key of Object.keys(plugin.input)) {
const inputDef = plugin.input[key];
if (inputDef.optionsMapping && inputDef.component?.options) {
const mapping = inputDef.optionsMapping;
for (const opt of inputDef.component.options) {
if (mapping[opt.value] !== undefined) {
opt.label = mapping[opt.value];
}
}
}
}
}
}
}