-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.js
35 lines (35 loc) · 1.14 KB
/
global.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Vue from "vue";
import variables from "@/static/variables.scss";
Vue.prototype.$bus = new Vue();
Vue.mixin({
computed: {
mainTheme() {
return variables["main-theme"];
},
mainThemePlain() {
return variables["main-theme-plain"];
},
navigationBarWidth() {
return variables["navigation-bar-width"];
},
cmsHeaderWidth() {
return variables["cms-header-width"];
},
cmsHeaderWidthWithCollapseNavigationBar() {
return variables["cms-header-width-with-collapse-navigation-bar"];
},
isMobile() {
return this.$vuetify.breakpoint.name == 'sm' || this.$vuetify.breakpoint.name == 'xs';
},
viewPortRatio() {
if (window.innerWidth < 1024)
return variables["phone-width-ratio"]
else if (window.innerWidth < 1440)
return variables["small-pad-width-ratio"]
else if (window.innerWidth < 1920)
return variables["pad-width-ratio"]
else
return variables["pc-width-ratio"]
}
},
});