12345678910111213141516171819202122232425262728293031323334 |
- import Vue from 'vue';
- import VProgressLinear from '../components/VProgressLinear';
- /**
- * Loadable
- *
- * @mixin
- *
- * Used to add linear progress bar to components
- * Can use a default bar with a specific color
- * or designate a custom progress linear bar
- */
- /* @vue/component */
- export default Vue.extend().extend({
- name: 'loadable',
- props: {
- loading: {
- type: [Boolean, String],
- default: false
- }
- },
- methods: {
- genProgress: function genProgress() {
- if (this.loading === false) return null;
- return this.$slots.progress || this.$createElement(VProgressLinear, {
- props: {
- color: this.loading === true || this.loading === '' ? this.color || 'primary' : this.loading,
- height: 2,
- indeterminate: true
- }
- });
- }
- }
- });
- //# sourceMappingURL=loadable.js.map
|