@tekkare/auriga 0.2.165 → 0.2.167
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/dist/module.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
size="20"
|
|
27
27
|
:color="trueActiveMenu === item.name ? '' : 'var(--dark)'"
|
|
28
28
|
/>
|
|
29
|
-
<p>{{ item.name }}</p>
|
|
29
|
+
<p>{{ getLabel(item.name) }}</p>
|
|
30
30
|
</div>
|
|
31
31
|
<div
|
|
32
32
|
v-if="item.name === 'Sources' && sourceAmount > 0"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
trueActiveMenu === item.name ? '' : 'hide',
|
|
46
46
|
]"
|
|
47
47
|
>
|
|
48
|
-
<slot :name="item.name
|
|
48
|
+
<slot :name="item.name" />
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
import {
|
|
58
58
|
onMounted,
|
|
59
59
|
ref,
|
|
60
|
-
onUnmounted,
|
|
61
60
|
onBeforeMount,
|
|
62
61
|
defineComponent,
|
|
63
62
|
watch
|
|
@@ -145,25 +144,22 @@ export default defineComponent({
|
|
|
145
144
|
trueActiveMenu.value = props.activeMenu;
|
|
146
145
|
infoOpen.value = props.toolbarOpen;
|
|
147
146
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
body
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const removeOverflow = () => {
|
|
155
|
-
const body = document.querySelector("html");
|
|
156
|
-
if (body) {
|
|
157
|
-
body.style.removeProperty("overflow");
|
|
147
|
+
function toggleBodyOverflow(state) {
|
|
148
|
+
if (typeof window !== "undefined") {
|
|
149
|
+
const body = document.querySelector("html");
|
|
150
|
+
if (body) {
|
|
151
|
+
state ? body.style.setProperty("overflow", "hidden") : body.style.removeProperty("overflow");
|
|
152
|
+
}
|
|
158
153
|
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
removeOverflow();
|
|
162
|
-
});
|
|
154
|
+
}
|
|
155
|
+
watch(infoOpen, toggleBodyOverflow, { immediate: true });
|
|
163
156
|
function openMenu(item) {
|
|
164
157
|
trueActiveMenu.value = item;
|
|
165
158
|
emit("update:Menu", trueActiveMenu.value);
|
|
166
159
|
}
|
|
160
|
+
function getLabel(item) {
|
|
161
|
+
return item.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (str) => str.toUpperCase());
|
|
162
|
+
}
|
|
167
163
|
function closeInfo() {
|
|
168
164
|
infoOpen.value = false;
|
|
169
165
|
emit("update:Open", infoOpen.value);
|
|
@@ -173,7 +169,8 @@ export default defineComponent({
|
|
|
173
169
|
trueActiveMenu,
|
|
174
170
|
openMenu,
|
|
175
171
|
closeInfo,
|
|
176
|
-
langData
|
|
172
|
+
langData,
|
|
173
|
+
getLabel
|
|
177
174
|
};
|
|
178
175
|
}
|
|
179
176
|
});
|
|
@@ -29,6 +29,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
29
29
|
openMenu: (item: string) => void;
|
|
30
30
|
closeInfo: () => void;
|
|
31
31
|
langData: import("vue").Ref<any, any>;
|
|
32
|
+
getLabel: (item: string) => string;
|
|
32
33
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Menu" | "update:Open")[], "update:Menu" | "update:Open", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
34
|
toolbarOpen: {
|
|
34
35
|
type: BooleanConstructor;
|