Toastr.js 629 B

123456789101112131415161718192021222324252627
  1. export default class Toastr {
  2. constructor(Dcat) {
  3. let _this = this;
  4. Dcat.success = _this.success;
  5. Dcat.error = _this.error;
  6. Dcat.info = _this.info;
  7. Dcat.warning = _this.warning;
  8. }
  9. success(message, title, options) {
  10. toastr.success(message, title, options);
  11. }
  12. error(message, title, options) {
  13. toastr.error(message, title, options);
  14. }
  15. info(message, title, options) {
  16. toastr.info(message, title, options);
  17. }
  18. warning(message, title, options) {
  19. toastr.warning(message, title, options);
  20. }
  21. }