We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
代码混合开发的模式中, 使用 onBroadcast 无法在外部获取 broadcast 事件 console 中能看到 amis 的日志 “run action broadcast” 但是无法看到 外部 handleBroadcast 响应函数中的 console 日志
你是如何使用 amis 的? react 版本
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 6.10.0
粘贴有问题的完整 amis schema 代码:
amis schema
let amisJSON = { type: 'page', title: '表单页面', body: [ { type: 'form', mode: 'horizontal', onEvent: { submitSucc: { actions: [ { actionType: 'broadcast', args: { eventName: 'formSubmited' } } ] } }, body: [ { label: 'Name', type: 'input-text', name: 'name' }, { type: 'submit', label: 'Submit' } ] } ] }; import {render as renderAmis} from 'amis'; function DemoComponent() { function handleBroadcast(type: string, rawEvent: any, data: any) { console.log(type); if (type === 'formSubmited') { console.log('内部表单提交了'); } } return <div> {renderAmis(amisJSON, {onBroadcast: handleBroadcast})} </div> };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
描述问题:
代码混合开发的模式中, 使用 onBroadcast 无法在外部获取 broadcast 事件
console 中能看到 amis 的日志 “run action broadcast”
但是无法看到 外部 handleBroadcast 响应函数中的 console 日志
截图或视频:
如何复现(请务必完整填写下面内容):
你是如何使用 amis 的?
react 版本
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
6.10.0
粘贴有问题的完整
amis schema
代码:参见
https://codesandbox.io/p/devbox/amis-broadcast-d8pvfl
The text was updated successfully, but these errors were encountered: