@hostlink/nuxt-light 1.3.1 → 1.3.2

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
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.3.1"
4
+ "version": "1.3.2"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref } from 'vue'
2
+ import { ref, computed } from 'vue'
3
3
  const props = defineProps(["value", "dense"])
4
4
  const menus = ref(null);
5
5
 
@@ -24,14 +24,24 @@ defineExpose({
24
24
  }
25
25
  })
26
26
 
27
+ const isShowExpansionItem = computed(() => {
28
+ if (props.value.children) {
29
+ if (props.value.children.length > 0) {
30
+ return true;
31
+
32
+ }
33
+ }
34
+ return false;
35
+
36
+ });
37
+
27
38
  </script>
28
39
 
29
40
  <style scoped>
30
41
  .menu-list .q-item{border-radius:12px 12px 12px 12px}.menu-list .q-router-link--exact-active{background:linear-gradient(118deg,var(--q-primary),rgba(115,103,240,.7));color:#fff}
31
42
  </style>
32
43
  <template>
33
- <q-expansion-item v-if="value.children?.length > 0" :label="$t(value.label)" :icon="value.icon" :dense="dense"
34
- ref="expansion">
44
+ <q-expansion-item v-if="isShowExpansionItem" :label="$t(value.label)" :icon="value.icon" :dense="dense" ref="expansion">
35
45
  <q-list class="q-pl-md">
36
46
  <l-menu :value="menu" v-for="menu in value.children" :dense="dense" @show="onShowChild(menu)"
37
47
  ref="menus"></l-menu>
@@ -39,8 +49,8 @@ defineExpose({
39
49
  </q-expansion-item>
40
50
  <q-list v-else class="menu-list" :dense="dense">
41
51
  <q-separator v-if="value.type == 'separator'" :spaced="value.spaced" />
42
- <q-item-label header v-if="value.type=='header'">{{ value.label }}</q-item-label>
43
- <q-item v-ripple :to="value.to" v-if="!value.type" >
52
+ <q-item-label header v-if="value.type == 'header'">{{ value.label }}</q-item-label>
53
+ <q-item v-ripple :to="value.to" v-if="!value.type">
44
54
  <q-item-section avatar>
45
55
  <q-icon :name="value.icon" />
46
56
  </q-item-section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",