mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +08:00
f1b383608b
* fix:修复事件动作对禁用状态控制失效问题&更新文档示例 * fix:修复事件动作对禁用状态控制失效问题 * fix:修复事件动作对禁用状态控制失效问题
46 lines
984 B
JavaScript
46 lines
984 B
JavaScript
export default {
|
|
type: 'page',
|
|
body: {
|
|
type: 'form',
|
|
api: 'https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/saveForm',
|
|
title: '登录',
|
|
body: [
|
|
{
|
|
type: 'alert',
|
|
body: '阻止表单提交后的默认提示。',
|
|
level: 'info',
|
|
className: 'mb-1'
|
|
},
|
|
{
|
|
type: 'input-text',
|
|
name: 'name',
|
|
label: '姓名'
|
|
},
|
|
{
|
|
type: 'input-email',
|
|
name: 'email',
|
|
label: '邮箱'
|
|
}
|
|
],
|
|
onEvent: {
|
|
submitFail: {
|
|
actions: [
|
|
{
|
|
actionType: 'drawer',
|
|
drawer: {
|
|
title: '请求失败',
|
|
body: {
|
|
type: 'alert',
|
|
level: 'warning',
|
|
icon: 'fa fa-cloud',
|
|
body: '请求失败,若给您造成不便,敬请谅解。'
|
|
}
|
|
},
|
|
preventDefault: true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
};
|