(appInfo, name)
| 272 | * @return {Object|Array|String} |
| 273 | */ |
| 274 | export const findConfigValue = (appInfo, name) => { |
| 275 | if (!appInfo.configFormProperties || !appInfo.flowGraph?.appearance) { |
| 276 | return null; |
| 277 | } |
| 278 | const configItem = findConfigItem(appInfo.configFormProperties, name); |
| 279 | if (!configItem) { |
| 280 | return null; |
| 281 | } |
| 282 | if (configItem.from === 'graph') { |
| 283 | const graphOperator = createGraphOperator(JSON.stringify(appInfo.flowGraph.appearance)); |
| 284 | return graphOperator.getConfig(configItem.defaultValue); |
| 285 | } |
| 286 | return configItem.defaultValue; |
| 287 | }; |
| 288 | |
| 289 | /** |
| 290 | * 获取应用某一个配置项 |
no test coverage detected