(object: any, { data, addons }: any)
| 293 | }; |
| 294 | |
| 295 | export const transDataKeyToData = (object: any, { data, addons }: any) => { |
| 296 | // 进行动态数据绑定 |
| 297 | Object.keys(object).forEach((key) => { |
| 298 | const item = object[key]; |
| 299 | if (typeof item !== 'string') { |
| 300 | return; |
| 301 | } |
| 302 | |
| 303 | if (startsWith(item, 'source:')) { |
| 304 | object[key] = getValueFromKey({ path: item, data, addons }); |
| 305 | return; |
| 306 | } |
| 307 | |
| 308 | if (startsWith(item, 'data:')) { |
| 309 | const path = item.split('data:')[1]?.trim(); |
| 310 | object[key] = getValueFromKey({ path, data, addons }); |
| 311 | } |
| 312 | }); |
| 313 | }; |
nothing calls this directly
no test coverage detected