amis chart组件toolbox自定义事件无法绑定函数

qf9go6mv  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(114)
描述问题:

在使用chart组件时,自定义toolbox的feature无法绑定事件。

截图或视频:

如何复现(请务必完整填写下面内容):
  1. 你是如何使用 amis 的?
    sdknpm
  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    3.1
  3. 粘贴有问题的完整 amis schema 代码:
{
  "type": "page",
  "body": {
    "type": "chart",
    "api": "/amis/api/mock2/chart/chartData",
    "config": {
      "toolbox": {
        "show": true,
        "feature": {
          "myDownload": {
            "show": true,
            "title": "数据导出",
            "icon": "image://https://echarts.apache.org/zh/images/favicon.png",
            "onclick": "function () { alert(\"need help\");}"
          }
        }
      },
      "xAxis": {
        "type": "category",
        "data": [
          "Mon",
          "Tue",
          "Wed",
          "Thu",
          "Fri",
          "Sat"
        ]
      },
      "yAxis": {
        "type": "value"
      },
      "series": [
        {
          "data": "${line || []}",
          "type": "line"
        }
      ]
    }
  }
}
  1. 操作步骤
    无需其他操作,直接就会报错
fkaflof6

fkaflof61#

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

相关问题