1 | import { install } from './install';
|
2 |
|
3 | import * as services from './services';
|
4 |
|
5 | import "../src/styles/main.sass";
|
6 | export default class Vuetify {
|
7 | constructor(preset = {}) {
|
8 | this.framework = {};
|
9 | this.installed = [];
|
10 | this.preset = {};
|
11 | this.preset = preset;
|
12 | this.use(services.Application);
|
13 | this.use(services.Breakpoint);
|
14 | this.use(services.Goto);
|
15 | this.use(services.Icons);
|
16 | this.use(services.Lang);
|
17 | this.use(services.Theme);
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | init(root, ssrContext) {
|
24 | this.installed.forEach(property => {
|
25 | const service = this.framework[property];
|
26 | service.framework = this.framework;
|
27 | service.init(root, ssrContext);
|
28 | });
|
29 |
|
30 |
|
31 |
|
32 | this.framework.rtl = Boolean(this.preset.rtl);
|
33 | }
|
34 |
|
35 |
|
36 | use(Service) {
|
37 | const property = Service.property;
|
38 | if (this.installed.includes(property)) return;
|
39 | this.framework[property] = new Service(this.preset[property]);
|
40 | this.installed.push(property);
|
41 | }
|
42 |
|
43 | }
|
44 | Vuetify.install = install;
|
45 | Vuetify.installed = false;
|
46 | Vuetify.version = "2.1.11";
|
47 |
|
\ | No newline at end of file |