1.5.0版本 mapping 组件 在crud中使用,数据映射显示数据有问题
- Dominant language
- TypeScript
- Stars
- 18.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
1.5.0版本 mapping 组件 在crud中使用,数据映射显示数据有问题
数据中心 的ID 是一样的
```
{
"type": "mapping",
"label": "数据中心ID",
"name": "DataCenterID",
"map": {},
"source": {
"method": "get",
"cache": 1,
"url": "/ram/datacenter/select/options",
"adaptor": "var data = {};\n payload.data.options.forEach(e=>{data[e.value] = e.label}); \n payload.data = data; \n return payload;\n"
}
},
```

去掉 "map": {}, 显示 通配符:
```
{
"type": "mapping",
"label": "数据中心ID",
"name": "DataCenterID",
"source": {
"method": "get",
"cache": 1,
"url": "/ram/datacenter/select/options",
"adaptor": "var data = {};\n payload.data.options.forEach(e=>{data[e.value] = e.label}); \n payload.data = data; \n return payload;\n"
}
},
```

Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported mapping configuration inside a CRUD view, comparing behavior with "map": {} present and omitted. Start by locating the mapping component and its handling of the source adaptor response; done means the DataCenterID value displays the returned label rather than a wildcard in both relevant configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100