This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/es5/mixins/bootable/index.js

61 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2019-08-11 18:48:02 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _console = require("../../util/console");
var _vue = _interopRequireDefault(require("vue"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Utilities
// Types
/**
* Bootable
* @mixin
*
* Used to add lazy content functionality to components
* Looks for change in "isActive" to automatically boot
* Otherwise can be set manually
*/
/* @vue/component */
var _default = _vue.default.extend().extend({
name: 'bootable',
props: {
eager: Boolean
},
data: function data() {
return {
isBooted: false
};
},
computed: {
hasContent: function hasContent() {
return this.isBooted || this.eager || this.isActive;
}
},
watch: {
isActive: function isActive() {
this.isBooted = true;
}
},
created: function created() {
/* istanbul ignore next */
if ('lazy' in this.$attrs) {
(0, _console.removed)('lazy', this);
}
},
methods: {
showLazyContent: function showLazyContent(content) {
return this.hasContent ? content : undefined;
}
}
});
exports.default = _default;
//# sourceMappingURL=index.js.map