@itools-front/ifrontui
Version:
Vue Material Component Framework
60 lines (53 loc) • 1.32 kB
JavaScript
// Styles
import "..\\..\\..\\src\\components\\VApp\\VApp.sass"; // Mixins
import Themeable from '../../mixins/themeable'; // Utilities
import mixins from '../../util/mixins';
import { getSlot } from '../../util/helpers';
/* @vue/component */
export default mixins(Themeable).extend({
name: 'v-app',
props: {
dark: {
type: Boolean,
default: undefined
},
id: {
type: String,
default: 'app'
},
light: {
type: Boolean,
default: undefined
}
},
computed: {
isDark() {
return this.$ifrontui.theme.dark;
}
},
beforeCreate() {
if (!this.$ifrontui || this.$ifrontui === this.$root) {
throw new Error('Vuetify is not properly initialized, see https://v2.vuetifyjs.com/getting-started/quick-start#bootstrapping-the-vuetify-object');
}
},
render(h) {
const wrapper = h('div', {
staticClass: 'v-application--wrap'
}, getSlot(this));
return h('div', {
staticClass: 'v-application',
class: {
'v-application--is-rtl': this.$ifrontui.rtl,
'v-application--is-ltr': !this.$ifrontui.rtl,
...this.themeClasses
},
attrs: {
'data-app': true
},
domProps: {
id: this.id
}
}, [wrapper]);
}
});
//# sourceMappingURL=VApp.js.map