amis/examples/components/EventAction/Custom.jsx
hsm-lv 8cc8283ded
feat:补充一些通用动作&完善事件动作机制示例 (#3495)
* feat:补充一些通用动作&完善事件动作机制示例

* feat:补充一些通用动作&完善事件动作机制示例
2022-01-26 09:18:48 +08:00

24 lines
548 B
JavaScript

export default {
type: 'page',
title: '自定义JS',
regions: ['body', 'toolbar', 'header'],
body: [
{
type: 'button',
label: '发送个请求',
className: 'ml-2',
onEvent: {
click: {
actions: [
{
actionType: 'custom',
script:
"doAction({actionType: 'ajax',api: 'https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm'});\n //event.stopPropagation();"
}
]
}
}
}
]
};