Dialog.js 791 B

123456789101112131415161718192021222324252627282930313233343536
  1. export default class Dialog {
  2. constructor(Dcat) {
  3. this.extend(Dcat)
  4. }
  5. extend(Dcat) {
  6. let _this = this;
  7. Dcat.success = _this.success;
  8. Dcat.error = _this.error;
  9. Dcat.info = _this.info;
  10. Dcat.warning = _this.warning;
  11. Dcat.confirm = _this.confirm;
  12. }
  13. success(message, title, options) {
  14. toastr.success(message, title, options);
  15. }
  16. error(message, title, options) {
  17. toastr.error(message, title, options);
  18. }
  19. info(message, title, options) {
  20. toastr.info(message, title, options);
  21. }
  22. warning(message, title, options) {
  23. toastr.warning(message, title, options);
  24. }
  25. confirm(message, title, success, error, options) {
  26. }
  27. }