Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ssr-bootable.js 938B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _vue = require('vue');
  6. var _vue2 = _interopRequireDefault(_vue);
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. /**
  9. * SSRBootable
  10. *
  11. * @mixin
  12. *
  13. * Used in layout components (drawer, toolbar, content)
  14. * to avoid an entry animation when using SSR
  15. */
  16. exports.default = _vue2.default.extend({
  17. name: 'ssr-bootable',
  18. data: function data() {
  19. return {
  20. isBooted: false
  21. };
  22. },
  23. mounted: function mounted() {
  24. var _this = this;
  25. // Use setAttribute instead of dataset
  26. // because dataset does not work well
  27. // with unit tests
  28. window.requestAnimationFrame(function () {
  29. _this.$el.setAttribute('data-booted', 'true');
  30. _this.isBooted = true;
  31. });
  32. }
  33. });
  34. //# sourceMappingURL=ssr-bootable.js.map