Elements-SY

modify

...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 <sidebar class="sidebar-container" 4 <sidebar class="sidebar-container"
5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 <div :class="{ hasTagsView: needTagsView }" class="main-container"> 6 <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 - <div class="headerRef" :class="{ 'fixed-header': fixedHeader }" ref="headerRef"> 7 + <div class="headerRef" :class="{ 'fixed-header': fixedHeader }">
8 <navbar /> 8 <navbar />
9 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
10 </div> 10 </div>
11 - <app-main ref="appMainBlock" /> 11 + <app-main />
12 <right-panel v-if="false"> 12 <right-panel v-if="false">
13 <settings /> 13 <settings />
14 </right-panel> 14 </right-panel>
......
...@@ -6,7 +6,6 @@ const WIDTH = 992; // refer to Bootstrap's responsive design ...@@ -6,7 +6,6 @@ const WIDTH = 992; // refer to Bootstrap's responsive design
6 export default { 6 export default {
7 watch: { 7 watch: {
8 $route(route) { 8 $route(route) {
9 - this.getBlockCurrentHeight();
10 if (this.device === "mobile" && this.sidebar.opened) { 9 if (this.device === "mobile" && this.sidebar.opened) {
11 store.dispatch("app/closeSideBar", { withoutAnimation: false }); 10 store.dispatch("app/closeSideBar", { withoutAnimation: false });
12 } 11 }
...@@ -24,9 +23,6 @@ export default { ...@@ -24,9 +23,6 @@ export default {
24 store.dispatch("app/toggleDevice", "mobile"); 23 store.dispatch("app/toggleDevice", "mobile");
25 store.dispatch("app/closeSideBar", { withoutAnimation: true }); 24 store.dispatch("app/closeSideBar", { withoutAnimation: true });
26 } 25 }
27 - this.$nextTick(()=>{
28 - this.getBlockCurrentHeight();
29 - })
30 }, 26 },
31 methods: { 27 methods: {
32 // use $_ for mixins properties 28 // use $_ for mixins properties
...@@ -45,11 +41,5 @@ export default { ...@@ -45,11 +41,5 @@ export default {
45 } 41 }
46 } 42 }
47 }, 43 },
48 - getBlockCurrentHeight() {
49 - let appHeaderHeight = this.$refs.headerRef.clientHeight;
50 - let appMainHeight = this.$refs.appMainBlock.$el.clientHeight;
51 - this.$store.dispatch("app/setAppHeaderBlockCH", appHeaderHeight);
52 - this.$store.dispatch("app/setAppMainBlockCH", appMainHeight);
53 - },
54 }, 44 },
55 }; 45 };
......
...@@ -2,8 +2,6 @@ const getters = { ...@@ -2,8 +2,6 @@ const getters = {
2 sidebar: (state) => state.app.sidebar, 2 sidebar: (state) => state.app.sidebar,
3 size: (state) => state.app.size, 3 size: (state) => state.app.size,
4 device: (state) => state.app.device, 4 device: (state) => state.app.device,
5 - appHeaderBlockClientHeight: (state) => state.app.headerBlockClientHeight,
6 - appMainBlockClientHeight: (state) => state.app.appMainBlockClientHeight,
7 visitedViews: (state) => state.tagsView.visitedViews, 5 visitedViews: (state) => state.tagsView.visitedViews,
8 cachedViews: (state) => state.tagsView.cachedViews, 6 cachedViews: (state) => state.tagsView.cachedViews,
9 token: (state) => state.user.token, 7 token: (state) => state.user.token,
......
...@@ -10,8 +10,6 @@ const state = { ...@@ -10,8 +10,6 @@ const state = {
10 device: "desktop", 10 device: "desktop",
11 //size: Cookies.get('size') || 'medium' 11 //size: Cookies.get('size') || 'medium'
12 size: localStorage.getItem("size") || "medium", 12 size: localStorage.getItem("size") || "medium",
13 - headerBlockClientHeight: null,
14 - appMainBlockClientHeight: null,
15 }; 13 };
16 14
17 const mutations = { 15 const mutations = {
...@@ -40,12 +38,6 @@ const mutations = { ...@@ -40,12 +38,6 @@ const mutations = {
40 //Cookies.set('size', size) 38 //Cookies.set('size', size)
41 localStorage.setItem("size", size); 39 localStorage.setItem("size", size);
42 }, 40 },
43 - SET_APPHEADERBLOCKCH: (state, height) => {
44 - state.headerBlockClientHeight = height;
45 - },
46 - SET_APPMAINBLOCKCH: (state, height) => {
47 - state.appMainBlockClientHeight = height;
48 - },
49 }; 41 };
50 42
51 const actions = { 43 const actions = {
...@@ -61,12 +53,6 @@ const actions = { ...@@ -61,12 +53,6 @@ const actions = {
61 setSize({ commit }, size) { 53 setSize({ commit }, size) {
62 commit("SET_SIZE", size); 54 commit("SET_SIZE", size);
63 }, 55 },
64 - setAppHeaderBlockCH({ commit }, height) {
65 - commit("SET_APPHEADERBLOCKCH", height);
66 - },
67 - setAppMainBlockCH({ commit }, height) {
68 - commit("SET_APPMAINBLOCKCH", height);
69 - },
70 }; 56 };
71 57
72 export default { 58 export default {
......