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 698B

1234567891011121314151617181920212223242526272829
  1. import Vue from 'vue';
  2. /**
  3. * SSRBootable
  4. *
  5. * @mixin
  6. *
  7. * Used in layout components (drawer, toolbar, content)
  8. * to avoid an entry animation when using SSR
  9. */
  10. export default Vue.extend({
  11. name: 'ssr-bootable',
  12. data: function data() {
  13. return {
  14. isBooted: false
  15. };
  16. },
  17. mounted: function mounted() {
  18. var _this = this;
  19. // Use setAttribute instead of dataset
  20. // because dataset does not work well
  21. // with unit tests
  22. window.requestAnimationFrame(function () {
  23. _this.$el.setAttribute('data-booted', 'true');
  24. _this.isBooted = true;
  25. });
  26. }
  27. });
  28. //# sourceMappingURL=ssr-bootable.js.map