Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs的title配置source时取不到其中的数据 #10259

Closed
thinkingc opened this issue May 17, 2024 · 1 comment · Fixed by #10265
Closed

tabs的title配置source时取不到其中的数据 #10259

thinkingc opened this issue May 17, 2024 · 1 comment · Fixed by #10265

Comments

@thinkingc
Copy link

描述问题:

tabs的title支持schema配置,但配置source时取不到其中的数据

截图或视频:

image

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

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

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    最新官网依然存在问题

  3. 粘贴有问题的完整 amis schema 代码:

{
  "type": "page",
  "data": {
    "arr": [
      {
        "a": "收入",
        "b": 199
      },
      {
        "a": "支出",
        "b": 299
      }
    ]
  },
  "body": [
    {
      "type": "tabs",
      "source": "${arr}",
      "tabs": [
        {
          "title": {
            "type": "tpl",
            "tpl": "这里取不到a数据:${a}"
          },
          "body": {
            "type": "tpl",
            "tpl": "金额:${b|number}元"
          }
        }
      ]
    }
  ]
}
  1. 操作步骤
    期望可以在title中获取到source中对应的数据

关键代码:
image

@2betop
Copy link
Collaborator

2betop commented May 17, 2024

对,这段代码有问题,感谢反馈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants