mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
8cc8283ded
* feat:补充一些通用动作&完善事件动作机制示例 * feat:补充一些通用动作&完善事件动作机制示例
24 lines
548 B
JavaScript
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();"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
};
|