fix:chart事件失效问题 (#5765)

This commit is contained in:
hsm-lv 2022-11-15 21:04:22 +08:00 committed by GitHub
parent 39ab060c54
commit d948cb13c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -45,6 +45,16 @@ export default {
}
}
]
},
legendselectchanged: {
actions: [
{
actionType: 'toast',
args: {
msg: '${event.data|json}'
}
}
]
}
},
config: {

View File

@ -309,7 +309,7 @@ export class Chart extends React.Component<ChartProps> {
const {data, dispatchEvent} = this.props;
dispatchEvent(
(ctx as any).event,
(ctx as any).event || ctx.type,
createObject(data, {
...pick(
ctx,