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.

loadable.js 951B

12345678910111213141516171819202122232425262728293031323334
  1. import Vue from 'vue';
  2. import VProgressLinear from '../components/VProgressLinear';
  3. /**
  4. * Loadable
  5. *
  6. * @mixin
  7. *
  8. * Used to add linear progress bar to components
  9. * Can use a default bar with a specific color
  10. * or designate a custom progress linear bar
  11. */
  12. /* @vue/component */
  13. export default Vue.extend().extend({
  14. name: 'loadable',
  15. props: {
  16. loading: {
  17. type: [Boolean, String],
  18. default: false
  19. }
  20. },
  21. methods: {
  22. genProgress: function genProgress() {
  23. if (this.loading === false) return null;
  24. return this.$slots.progress || this.$createElement(VProgressLinear, {
  25. props: {
  26. color: this.loading === true || this.loading === '' ? this.color || 'primary' : this.loading,
  27. height: 2,
  28. indeterminate: true
  29. }
  30. });
  31. }
  32. }
  33. });
  34. //# sourceMappingURL=loadable.js.map