Skip to content

formatter 自定义显示无法访问外部变量 #175

Description

@puxiaoshuai

tooltip: {
trigger: 'item',
formatter: function(params,data) {
return data;
}
},
直接返回 item_xxxx_0

tooltip: {
trigger: 'item',
formatter: function(params) {
return this.state.data;
}
},
直接报错说 this.state.data没被定义。
formatter方法中无法执行console.log()

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions