nprogress.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. (function (global, factory) {
  2. if (typeof define === "function" && define.amd) {
  3. define("/Plugin/nprogress", ["exports", "Plugin"], factory);
  4. } else if (typeof exports !== "undefined") {
  5. factory(exports, require("Plugin"));
  6. } else {
  7. var mod = {
  8. exports: {}
  9. };
  10. factory(mod.exports, global.Plugin);
  11. global.PluginNprogress = mod.exports;
  12. }
  13. })(this, function (_exports, _Plugin2) {
  14. "use strict";
  15. Object.defineProperty(_exports, "__esModule", {
  16. value: true
  17. });
  18. _exports.default = void 0;
  19. _Plugin2 = babelHelpers.interopRequireDefault(_Plugin2);
  20. var NAME = 'nprogress';
  21. var Nprogress =
  22. /*#__PURE__*/
  23. function (_Plugin) {
  24. babelHelpers.inherits(Nprogress, _Plugin);
  25. function Nprogress() {
  26. babelHelpers.classCallCheck(this, Nprogress);
  27. return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Nprogress).apply(this, arguments));
  28. }
  29. babelHelpers.createClass(Nprogress, [{
  30. key: "getName",
  31. value: function getName() {
  32. return NAME;
  33. }
  34. }, {
  35. key: "render",
  36. value: function render() {
  37. if (typeof NProgress === 'undefined') {
  38. return;
  39. }
  40. NProgress.configure(this.options);
  41. }
  42. }], [{
  43. key: "getDefaults",
  44. value: function getDefaults() {
  45. return {
  46. minimum: 0.15,
  47. trickleRate: 0.07,
  48. trickleSpeed: 360,
  49. showSpinner: false,
  50. template: '<div class="bar" role="bar"></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
  51. };
  52. }
  53. }]);
  54. return Nprogress;
  55. }(_Plugin2.default);
  56. _Plugin2.default.register(NAME, Nprogress);
  57. var _default = Nprogress;
  58. _exports.default = _default;
  59. });