UNPKG

vuetify

Version:

Vue.js 2 Semantic Component Framework

33 lines (29 loc) 553 B
/** * Bootable * @mixin * * Used to add lazy content functionality to components * Looks for change in "isActive" to automatically boot * Otherwise can be set manually */ export default { name: 'bootable', data: function data() { return { isBooted: false }; }, props: { lazy: Boolean }, watch: { isActive: function isActive() { this.isBooted = true; } }, methods: { showLazyContent: function showLazyContent(content) { return this.isBooted || !this.lazy ? content : null; } } };