53 lines
No EOL
1.2 KiB
JavaScript
53 lines
No EOL
1.2 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
|
|
var _vue = _interopRequireDefault(require("vue"));
|
|
|
|
var _VProgressLinear = _interopRequireDefault(require("../../components/VProgressLinear"));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
/**
|
|
* 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 */
|
|
var _default = _vue.default.extend().extend({
|
|
name: 'loadable',
|
|
props: {
|
|
loading: {
|
|
type: [Boolean, String],
|
|
default: false
|
|
},
|
|
loaderHeight: {
|
|
type: [Number, String],
|
|
default: 2
|
|
}
|
|
},
|
|
methods: {
|
|
genProgress: function genProgress() {
|
|
if (this.loading === false) return null;
|
|
return this.$slots.progress || this.$createElement(_VProgressLinear.default, {
|
|
props: {
|
|
absolute: true,
|
|
color: this.loading === true || this.loading === '' ? this.color || 'primary' : this.loading,
|
|
height: this.loaderHeight,
|
|
indeterminate: true
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
exports.default = _default;
|
|
//# sourceMappingURL=index.js.map
|