@hostlink/nuxt-light 1.10.21 → 1.10.23
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
|
@@ -421,14 +421,17 @@ if (route.fullPath == "/" && my.default_page) {
|
|
|
421
421
|
</template>
|
|
422
422
|
</q-banner>
|
|
423
423
|
|
|
424
|
-
|
|
424
|
+
<!-- router-view v-slot="{ Component }">
|
|
425
425
|
|
|
426
426
|
<template v-if="Component">
|
|
427
427
|
<suspense>
|
|
428
428
|
<component :is="Component" :reloadMenu="reloadMenu"></component>
|
|
429
429
|
</suspense>
|
|
430
430
|
</template>
|
|
431
|
-
</router-view
|
|
431
|
+
</router-view -->
|
|
432
|
+
<NuxtLoadingIndicator />
|
|
433
|
+
|
|
434
|
+
<NuxtPage />
|
|
432
435
|
|
|
433
436
|
|
|
434
437
|
</q-page-container>
|
|
@@ -3,7 +3,7 @@ import { provide, ref } from 'vue'
|
|
|
3
3
|
import { useLight, watch } from "#imports";
|
|
4
4
|
import { useRuntimeConfig } from 'nuxt/app'
|
|
5
5
|
import { setApiUrl } from '@hostlink/light'
|
|
6
|
-
import { useQuasar
|
|
6
|
+
import { useQuasar } from 'quasar'
|
|
7
7
|
import { q } from '#imports'
|
|
8
8
|
import { useRoute } from "vue-router";
|
|
9
9
|
const config = useRuntimeConfig();
|
|
@@ -56,7 +56,8 @@ provide('color', color)
|
|
|
56
56
|
<slot name="header"></slot>
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
</l-app-main>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { useRoute } from 'vue-router'
|
|
2
3
|
import { ref, computed } from 'vue'
|
|
3
4
|
import { useLight } from '#imports'
|
|
4
5
|
const props = defineProps(["value", "dense"])
|
|
@@ -24,6 +25,28 @@ const color2 = computed(() => {
|
|
|
24
25
|
|
|
25
26
|
//generate a random group name
|
|
26
27
|
const group = Math.random().toString(36).substring(7);
|
|
28
|
+
|
|
29
|
+
const route = useRoute();
|
|
30
|
+
const path = route.path
|
|
31
|
+
const hasLink = (item) => {
|
|
32
|
+
if (item.children) {
|
|
33
|
+
for (let i = 0; i < item.children.length; i++) {
|
|
34
|
+
if (hasLink(item.children[i])) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (item.to == path) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const hasChildLink = () => {
|
|
46
|
+
return hasLink(props.value)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
27
50
|
</script>
|
|
28
51
|
|
|
29
52
|
<style scoped>
|
|
@@ -33,7 +56,7 @@ const group = Math.random().toString(36).substring(7);
|
|
|
33
56
|
<q-list class="menu-list" :dense="dense">
|
|
34
57
|
<template v-for="menu in value">
|
|
35
58
|
|
|
36
|
-
<q-expansion-item :label="$t(menu.label)" :icon="menu.icon" :dense="dense" v-if="isShowExpansionItem(menu)"
|
|
59
|
+
<q-expansion-item :default-opened="hasLink(menu)" :label="$t(menu.label)" :icon="menu.icon" :dense="dense" v-if="isShowExpansionItem(menu)"
|
|
37
60
|
:group="group">
|
|
38
61
|
<l-menu class="q-pl-md" :value="menu.children" :dense="dense"></l-menu>
|
|
39
62
|
</q-expansion-item>
|
|
@@ -11,29 +11,28 @@ const route = useRoute()
|
|
|
11
11
|
<q-splitter unit="px" :model-value="120">
|
|
12
12
|
<template #before>
|
|
13
13
|
<q-tabs v-model="tab" vertical :active-color="$light.color">
|
|
14
|
-
<q-route-tab name="general" icon="sym_o_info" :label="$t('General')" to="/User/setting" exact
|
|
15
|
-
replace />
|
|
14
|
+
<q-route-tab name="general" icon="sym_o_info" :label="$t('General')" to="/User/setting" exact />
|
|
16
15
|
<q-route-tab name="information" icon="sym_o_info" :label="$t('Information')"
|
|
17
|
-
to="/User/setting/information" exact
|
|
16
|
+
to="/User/setting/information" exact />
|
|
18
17
|
<q-route-tab name="password" icon="sym_o_password" :label="$t('Password')"
|
|
19
|
-
to="/User/setting/password" exact
|
|
20
|
-
<q-route-tab name="style" icon="sym_o_style" :label="$t('Style')" to="/User/setting/style"
|
|
21
|
-
|
|
22
|
-
<q-route-tab name="2fa" icon="sym_o_key" :label="$t('2FA')" to="/User/setting/two-factor-auth"
|
|
23
|
-
|
|
18
|
+
to="/User/setting/password" exact />
|
|
19
|
+
<q-route-tab name="style" icon="sym_o_style" :label="$t('Style')" to="/User/setting/style"
|
|
20
|
+
exact />
|
|
21
|
+
<q-route-tab name="2fa" icon="sym_o_key" :label="$t('2FA')" to="/User/setting/two-factor-auth"
|
|
22
|
+
exact />
|
|
24
23
|
<q-route-tab name="bio" icon="sym_o_fingerprint" :label="$t('Bio')" to="/User/setting/bio-auth"
|
|
25
|
-
exact
|
|
26
|
-
<q-route-tab name="openid" icon="sym_o_key" :label="$t('Open ID')" to="/User/setting/open_id"
|
|
27
|
-
|
|
24
|
+
exact />
|
|
25
|
+
<q-route-tab name="openid" icon="sym_o_key" :label="$t('Open ID')" to="/User/setting/open_id"
|
|
26
|
+
exact />
|
|
28
27
|
<q-route-tab name="myfav" icon="sym_o_star" :label="$t('My favorite')"
|
|
29
|
-
to="/User/setting/my_favorite" exact
|
|
28
|
+
to="/User/setting/my_favorite" exact />
|
|
30
29
|
|
|
31
30
|
</q-tabs>
|
|
32
31
|
</template>
|
|
33
32
|
|
|
34
33
|
<template #after>
|
|
35
|
-
<
|
|
36
|
-
|
|
34
|
+
<NuxtPage :key="route.path"></NuxtPage>
|
|
35
|
+
|
|
37
36
|
</template>
|
|
38
37
|
</q-splitter>
|
|
39
38
|
</l-card>
|