UNPKG

react-antd-admin-panel

Version:

Easy prototyping admin panel using React and Antd

33 lines 1.27 kB
export default class Axios { constructor() { this._data = undefined; this._error = undefined; this._success = undefined; this._onComplete = () => { }; this._onError = () => { }; this._onCatch = () => { }; this._onInit = () => { }; this._onThen = () => { }; this._header = []; } onComplete(value) { this._onComplete = value; return this; } onError(value) { this._onError = value; return this; } onCatch(value) { this._onCatch = value; return this; } onInit(value) { this._onInit = value; return this; } onThen(value) { this._onThen = value; return this; } doIf(value) { this._doIf = value; return this; } fail(v) { this._fail = v; return this; } alter(v) { this._alter = v; return this; } header(v) { this._header = v; return this; } target(value, targetFunction) { this._target = value; this._targetFunction = targetFunction !== null && targetFunction !== void 0 ? targetFunction : typeof value !== 'string'; return this; } targetBuild(args) { if (this._targetFunction) return this._target(args); return this._target; } } //# sourceMappingURL=Axios.js.map