aloha-vue 1.0.254 → 1.0.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.254",
4
+ "version": "1.0.255",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  computed,
3
- h,
3
+ h, onBeforeUnmount,
4
4
  provide,
5
5
  Teleport,
6
6
  toRef, watch,
@@ -12,13 +12,14 @@ import AMenuButtonToggle from "./AMenuButtonToggle";
12
12
  import AMenuPanel from "./AMenuPanel";
13
13
  import AMenuSearchPanel from "./AMenuSearchPanel";
14
14
 
15
- import MenuAttributesAPI from "./compositionAPI/MenuAttributesAPI";
16
15
  import AMenuBlockerClickAPI from "./compositionAPI/AMenuBlockerClickAPI";
17
16
  import AMenuDataAPI from "./compositionAPI/AMenuDataAPI";
18
17
  import AMenuPanelsAPI from "./compositionAPI/AMenuPanelsAPI";
19
18
  import AMenuResizeAPI from "./compositionAPI/AMenuResizeAPI";
20
19
  import AMenuSearchAPI from "./compositionAPI/AMenuSearchAPI";
21
20
  import AMenuToggleAPI from "./compositionAPI/AMenuToggleAPI";
21
+ import DestroyAPI from "./compositionAPI/DestroyAPI";
22
+ import MenuAttributesAPI from "./compositionAPI/MenuAttributesAPI";
22
23
 
23
24
  export default {
24
25
  name: "AMenu",
@@ -137,6 +138,10 @@ export default {
137
138
  setup(props) {
138
139
  const isLinkTruncated = toRef(props, "isLinkTruncated");
139
140
 
141
+ const {
142
+ removeBodyClasses,
143
+ } = DestroyAPI();
144
+
140
145
  const {
141
146
  dataKeyById,
142
147
  dataProParent,
@@ -209,6 +214,10 @@ export default {
209
214
 
210
215
  initMenuOpenOrClose();
211
216
 
217
+ onBeforeUnmount(() => {
218
+ removeBodyClasses();
219
+ });
220
+
212
221
  return {
213
222
  attributesBlockerClick,
214
223
  attributesMenuClick,
@@ -222,6 +231,7 @@ export default {
222
231
  isSearchActive,
223
232
  modelSearch,
224
233
  panelParentsOpen,
234
+ removeBodyClasses,
225
235
  toggleMenu,
226
236
  togglePanel,
227
237
  updateModelSearch,
@@ -0,0 +1,10 @@
1
+ export default function DestroyAPI() {
2
+ const removeBodyClasses = () => {
3
+ document.body.classList.remove("a_menu__wrapper_close");
4
+ document.body.classList.remove("a_menu__wrapper_open");
5
+ };
6
+
7
+ return {
8
+ removeBodyClasses,
9
+ };
10
+ }