form 表单提交前,请求完成后处理

Ext.data.Connection.on('beforerequest', function (conn, options) {
    console.log(222);
    if (options.form) {
        var form = options.scope.form;
        if (form instanceof Ext.form.BasicForm) {
            form.on('actioncomplete', function () {
                console.log(111);
            });
            form.on('actionfailed', function () {
                console.log(222);
            });
        }
    }
});


转载于:https://my.oschina.net/u/1426871/blog/284795

你可能感兴趣的:(form 表单提交前,请求完成后处理)