uiaction-result.ts 612 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

/**
 * 界面处理逻辑返回参数对象
 *
 * @export
 * @class UIActionResult
 */
export class UIActionResult {

    /**
     * 是否成功
     *
     * @type {*}
     * @memberof UIActionResult
     */
    public ok: boolean;

    /**
     * 返回数据对象
     *
     * @type {*}
     * @memberof UIActionResult
     */
    public result: any;

    /**
     * 构造函数
     * 
     * @param {*} opts 传入数据
     * @memberof UIActionResult
     */
    constructor(opts: any) {
        this.ok = opts?.ok ? opts.ok : false;
        this.result = opts?.result ? opts?.result : null;
    }

}