mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-29 03:26:31 +08:00
更新angular表单提交操作
This commit is contained in:
@@ -10,6 +10,7 @@ import { WebApi } from './webapi';
|
||||
import { RouterHelper } from '../angular/router-helper';
|
||||
import { Message } from './message';
|
||||
import { MessageConfig } from '../config/message-config';
|
||||
import { Dialog } from './dialog';
|
||||
|
||||
/**
|
||||
* 表单操作
|
||||
@@ -109,10 +110,10 @@ export class Form {
|
||||
options.handler && options.handler(result);
|
||||
if (options.showMessage !== false)
|
||||
Message.snack(MessageConfig.successed);
|
||||
if (options.reset)
|
||||
options.form.resetForm();
|
||||
if (options.back)
|
||||
RouterHelper.back();
|
||||
if (options.closeDialog)
|
||||
Dialog.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,10 +161,6 @@ export interface IFormSubmitOption {
|
||||
* 提交成功后是否关闭弹出层,当在弹出层中编辑时使用,默认为false
|
||||
*/
|
||||
closeDialog?: boolean;
|
||||
/**
|
||||
* 提交成功后是否重置表单,默认为false
|
||||
*/
|
||||
reset?: boolean;
|
||||
/**
|
||||
* 提交前处理函数,返回false则取消提交
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user