quasar-ui-danx 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -1
- package/danx-local.sh +1 -0
- package/dist/danx.es.js +3830 -3767
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +5 -5
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +1 -0
- package/src/components/Navigation/NavigationMenu.vue +85 -0
- package/src/components/Navigation/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/styles/general.scss +18 -0
- package/src/styles/index.scss +1 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="p-4"
|
4
|
+
:class="{ 'is-collapsed': collapsed }"
|
5
|
+
>
|
6
|
+
<div
|
7
|
+
v-for="item in allowedItems"
|
8
|
+
:key="'nav-item-' + item.label"
|
9
|
+
>
|
10
|
+
<a class="nav-link" @click="item.onClick">
|
11
|
+
<component
|
12
|
+
:is="item.icon"
|
13
|
+
class="nav-icon"
|
14
|
+
/>
|
15
|
+
<div class="label ml-2">{{ item.label }}</div>
|
16
|
+
<QTooltip v-if="collapsed">{{ item.label }}</QTooltip>
|
17
|
+
</a>
|
18
|
+
<QSeparator
|
19
|
+
v-if="item.separator"
|
20
|
+
:key="'separator-' + item.label"
|
21
|
+
class="my-2"
|
22
|
+
/>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</template>
|
26
|
+
<script setup>
|
27
|
+
import { computed } from "vue";
|
28
|
+
|
29
|
+
const props = defineProps({
|
30
|
+
collapsed: Boolean,
|
31
|
+
items: {
|
32
|
+
type: Array,
|
33
|
+
required: true
|
34
|
+
}
|
35
|
+
});
|
36
|
+
|
37
|
+
const allowedItems = computed(() => props.items.filter((item) => !item.hidden));
|
38
|
+
</script>
|
39
|
+
|
40
|
+
<style lang="scss">
|
41
|
+
.nav-link {
|
42
|
+
display: block !important;
|
43
|
+
padding: 1.2em;
|
44
|
+
border-radius: 0.5em;
|
45
|
+
font-weight: bold;
|
46
|
+
font-size: 14px;
|
47
|
+
color: black;
|
48
|
+
height: 3.8em;
|
49
|
+
width: 13em;
|
50
|
+
transition: all 150ms;
|
51
|
+
|
52
|
+
&:hover {
|
53
|
+
@apply bg-gray-200;
|
54
|
+
.nav-icon {
|
55
|
+
@apply text-gray-700;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
&.is-active {
|
60
|
+
@apply bg-blue-100;
|
61
|
+
}
|
62
|
+
|
63
|
+
&.is-disabled {
|
64
|
+
@apply bg-inherit;
|
65
|
+
}
|
66
|
+
|
67
|
+
.label {
|
68
|
+
@apply transition-all;
|
69
|
+
}
|
70
|
+
|
71
|
+
.nav-icon {
|
72
|
+
@apply w-5 h-5 flex-shrink-0 text-black;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
.is-collapsed {
|
77
|
+
.nav-link {
|
78
|
+
width: 3.8em;
|
79
|
+
}
|
80
|
+
|
81
|
+
.label {
|
82
|
+
@apply opacity-0;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
</style>
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as NavigationMenu } from "./NavigationMenu.vue";
|
package/src/components/index.ts
CHANGED
package/src/styles/index.scss
CHANGED