baidu / baidu/amis

"name": "${result|toJson|pick:status}", 之前可以这么取值在在组件里,现在3.1 取不到值

Open
#7,775 3 comments 0 reactions 0 assignees View on GitHub
need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 描述问题:

获取json 对象一个字段给组件上,现在版本获取不到
"name": "${result|toJson|pick:status}", 之前可以这么取值在在组件里,现在3.1 取不到值

#### 截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

#### 如何复现(请务必完整填写下面内容):

1. 你是如何使用 amis 的?
sdk

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
3.1.0
3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"disabled": false,
"enlargeAble": false,
"hidden": false,
"label": "处理结果",
"placeholder": "-",
"required": false,
"sortable": false,
"type": "mapping",
"validateOnChange": false,
"id": "u:23d69976ee1f",
"inline": true,
"name": "${result|toJson|pick:status}",
"tpl": "",
"map": {
"0": "成功"
}
},

```

4. 操作步骤
请简单描述一下复现的操作步骤...
{
"disabled": false,
"enlargeAble": false,
"hidden": false,
"label": "处理结果",
"placeholder": "-",
"required": false,
"sortable": false,
"type": "mapping",
"validateOnChange": false,
"id": "u:23d69976ee1f",
"inline": true,
"name": "${result|toJson|pick:status}",
"tpl": "",
"map": {
"0": "成功"
}
},

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the provided AMIS SDK schema and reproduce the mapping component using `name: "${result|toJson|pick:status}"` on version 3.1.0. Check how the expression resolves the `result.status` value and compare it with the previously working behavior. Done means the component retrieves the status and displays the mapped value again.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.