shared-ritm 1.2.79 → 1.2.81
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/README.md +103 -103
- package/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +9409 -8849
- package/dist/shared-ritm.umd.js +520 -520
- package/dist/types/api/services/UserService.d.ts +10 -1
- package/dist/types/api/types/Api_Service.d.ts +1 -1
- package/dist/types/api/types/Api_User.d.ts +11 -0
- package/dist/types/common/app-table/controllers/useTableModel.d.ts +1 -1
- package/dist/types/index.d.ts +3 -2
- package/package.json +64 -64
- package/src/api/services/PhotoService.ts +137 -137
- package/src/api/services/RepairsService.ts +119 -119
- package/src/api/services/UserService.ts +32 -19
- package/src/api/types/Api_Controls.ts +72 -72
- package/src/api/types/Api_Files.ts +1 -1
- package/src/api/types/Api_Instruments.ts +98 -98
- package/src/api/types/Api_Projects.ts +55 -55
- package/src/api/types/Api_Repairs.ts +115 -115
- package/src/api/types/Api_Service.ts +1 -1
- package/src/api/types/Api_User.ts +57 -44
- package/src/common/app-checkbox/AppCheckbox.vue +26 -26
- package/src/common/app-datepicker/AppDatepicker.vue +165 -165
- package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
- package/src/common/app-dropdown/AppDropdown.vue +31 -31
- package/src/common/app-input/AppInput.vue +148 -148
- package/src/common/app-input-new/AppInputNew.vue +152 -152
- package/src/common/app-select/AppSelect.vue +157 -157
- package/src/common/app-sheet/AppSheet.vue +120 -120
- package/src/common/app-sheet-new/AppSheetNew.vue +255 -0
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
- package/src/common/app-table/AppTable.vue +301 -297
- package/src/common/app-table/AppTableLayout.vue +126 -111
- package/src/common/app-table/components/ModalSelect.vue +270 -270
- package/src/common/app-table/components/TableModal.vue +329 -329
- package/src/common/app-table/components/TablePagination.vue +152 -152
- package/src/common/app-table/components/TableSearch.vue +76 -76
- package/src/common/app-table/controllers/useBaseTable.ts +42 -42
- package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
- package/src/common/app-table/controllers/useTableModel.ts +93 -93
- package/src/common/app-toggle/AppToggle.vue +24 -24
- package/src/common/app-wrapper/AppWrapper.vue +28 -28
- package/src/icons/components/table-filter-icon.vue +30 -30
- package/src/icons/dialogs/RemoveIcon.vue +12 -12
- package/src/icons/dialogs/SafetyIcon.vue +12 -12
- package/src/icons/task/attention-icon.vue +13 -13
- package/src/icons/task/clock-icon.vue +10 -10
- package/src/icons/task/delete-icon.vue +10 -10
- package/src/icons/task/fire-icon.vue +16 -16
- package/src/index.ts +3 -1
- package/src/main.ts +28 -28
- package/src/shared/styles/general.css +125 -125
- package/src/styles/variables.sass +12 -12
- package/src/utils/confirm.ts +12 -12
- package/src/utils/helpers.ts +58 -58
- package/src/utils/notification.ts +9 -9
- package/dist/types/api/types/Api_Users.d.ts +0 -43
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-dialog
|
|
3
|
+
ref="DialogRef"
|
|
4
|
+
:model-value="true"
|
|
5
|
+
:position="'right'"
|
|
6
|
+
:class="$style['sheet-dialog']"
|
|
7
|
+
:persistent="persistent"
|
|
8
|
+
no-shake
|
|
9
|
+
no-esc-dismiss
|
|
10
|
+
full-height
|
|
11
|
+
full-width
|
|
12
|
+
@before-hide="emit('before-hide')"
|
|
13
|
+
>
|
|
14
|
+
<div v-if="loading" class="custom-wrapper">
|
|
15
|
+
<div class="loader">
|
|
16
|
+
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div v-else class="wrapper">
|
|
20
|
+
<div v-if="tabs?.length" class="sidebar" :class="{ noTitle: !tabsTitle }" :style="{ width: sidebarWidth }">
|
|
21
|
+
<h5 v-if="tabsTitle">{{ tabsTitle }}</h5>
|
|
22
|
+
<q-tabs
|
|
23
|
+
v-model="currTabId"
|
|
24
|
+
vertical
|
|
25
|
+
align="justify"
|
|
26
|
+
inline-label
|
|
27
|
+
class="tabs"
|
|
28
|
+
dense
|
|
29
|
+
active-class="active-tab"
|
|
30
|
+
no-caps
|
|
31
|
+
>
|
|
32
|
+
<q-tab
|
|
33
|
+
v-for="tab in tabs"
|
|
34
|
+
:key="tab.id"
|
|
35
|
+
:class="$style['tab']"
|
|
36
|
+
:name="tab.title"
|
|
37
|
+
icon="radio_button_unchecked"
|
|
38
|
+
:label="tab.title"
|
|
39
|
+
/>
|
|
40
|
+
</q-tabs>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="content">
|
|
44
|
+
<div v-if="title" class="content-header">
|
|
45
|
+
<h2 class="ellipsis" :title="title">{{ title }}</h2>
|
|
46
|
+
<q-btn v-close-popup="!persistent" dense flat icon="close" @click="emit('close')" />
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<slot />
|
|
50
|
+
|
|
51
|
+
<div v-if="'actions' in slots" class="app-sheet-actions">
|
|
52
|
+
<slot name="actions" />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</q-dialog>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup lang="ts">
|
|
60
|
+
import { computed, defineEmits, defineProps, Ref, useSlots, withDefaults } from 'vue'
|
|
61
|
+
import { QDialog } from 'quasar'
|
|
62
|
+
|
|
63
|
+
interface DialogProps {
|
|
64
|
+
dialogRef: Ref<QDialog | undefined, QDialog | undefined>
|
|
65
|
+
loading?: boolean
|
|
66
|
+
title?: string
|
|
67
|
+
tabsTitle?: string
|
|
68
|
+
width?: string
|
|
69
|
+
type?: 'details' | 'custom'
|
|
70
|
+
tabs?: { id: string | number; title?: string }[]
|
|
71
|
+
tabId?: string
|
|
72
|
+
sidebarWidth?: string
|
|
73
|
+
persistent?: boolean
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const props = withDefaults(defineProps<DialogProps>(), {
|
|
77
|
+
title: '',
|
|
78
|
+
tabsTitle: '',
|
|
79
|
+
width: '1200px',
|
|
80
|
+
type: 'details',
|
|
81
|
+
loading: false,
|
|
82
|
+
tabs: () => [],
|
|
83
|
+
tabId: '',
|
|
84
|
+
sidebarWidth: '',
|
|
85
|
+
persistent: false,
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
const emit = defineEmits(['update:dialogRef', 'update:tabId', 'close', 'before-hide'])
|
|
89
|
+
|
|
90
|
+
const slots = useSlots()
|
|
91
|
+
|
|
92
|
+
const DialogRef = computed({
|
|
93
|
+
get() {
|
|
94
|
+
return props.dialogRef
|
|
95
|
+
},
|
|
96
|
+
set(value) {
|
|
97
|
+
emit('update:dialogRef', value)
|
|
98
|
+
},
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const currTabId = computed({
|
|
102
|
+
get() {
|
|
103
|
+
return props.tabId
|
|
104
|
+
},
|
|
105
|
+
set(value) {
|
|
106
|
+
emit('update:tabId', value)
|
|
107
|
+
},
|
|
108
|
+
})
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="scss" scoped>
|
|
112
|
+
.custom-wrapper {
|
|
113
|
+
width: v-bind(width);
|
|
114
|
+
background-color: white;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.loader {
|
|
118
|
+
min-width: 976px;
|
|
119
|
+
|
|
120
|
+
&-spinner {
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 50%;
|
|
123
|
+
left: 50%;
|
|
124
|
+
z-index: 4;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.wrapper {
|
|
129
|
+
display: flex;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
font-family: 'NunitoSansFont', sans-serif;
|
|
132
|
+
color: #3f414d;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.sidebar {
|
|
136
|
+
max-width: 25vw;
|
|
137
|
+
flex: none;
|
|
138
|
+
padding: 2rem 0 2rem 2rem;
|
|
139
|
+
background-color: #f4f9fd;
|
|
140
|
+
|
|
141
|
+
&.noTitle {
|
|
142
|
+
padding: 0 0 2rem 2rem;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
h5 {
|
|
146
|
+
font-size: 24px;
|
|
147
|
+
font-weight: 700;
|
|
148
|
+
padding-right: 2rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.tabs {
|
|
152
|
+
color: #b9c0c7;
|
|
153
|
+
transition-duration: 0.1s;
|
|
154
|
+
margin: 16px 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.active-tab {
|
|
158
|
+
color: #3f8cff;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.content {
|
|
163
|
+
background-color: #fff;
|
|
164
|
+
height: 100vh;
|
|
165
|
+
width: 100%;
|
|
166
|
+
display: grid;
|
|
167
|
+
grid-template-rows: auto 1fr auto;
|
|
168
|
+
|
|
169
|
+
&-header {
|
|
170
|
+
display: flex;
|
|
171
|
+
justify-content: space-between;
|
|
172
|
+
align-items: center;
|
|
173
|
+
padding: 4px 1rem;
|
|
174
|
+
border-bottom: 1px solid var(--g-grey-100);
|
|
175
|
+
overflow: hidden;
|
|
176
|
+
|
|
177
|
+
h2 {
|
|
178
|
+
font-size: 32px;
|
|
179
|
+
font-weight: 700;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.app-sheet-actions {
|
|
185
|
+
display: flex;
|
|
186
|
+
gap: 1rem;
|
|
187
|
+
padding: 1rem;
|
|
188
|
+
border-top: 1px solid var(--g-grey-100);
|
|
189
|
+
}
|
|
190
|
+
</style>
|
|
191
|
+
|
|
192
|
+
<style lang="scss" module>
|
|
193
|
+
.sheet-dialog {
|
|
194
|
+
:global(.q-dialog__inner) {
|
|
195
|
+
width: v-bind(width);
|
|
196
|
+
max-width: 95vw;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:global(.q-dialog__inner--minimized) {
|
|
200
|
+
padding: 0;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.tab {
|
|
205
|
+
padding: 0 !important;
|
|
206
|
+
|
|
207
|
+
:global(.q-focus-helper) {
|
|
208
|
+
display: none !important;
|
|
209
|
+
}
|
|
210
|
+
:global(.q-ripple) {
|
|
211
|
+
display: none !important;
|
|
212
|
+
}
|
|
213
|
+
:global(.q-tab__content) {
|
|
214
|
+
width: 100%;
|
|
215
|
+
justify-content: left;
|
|
216
|
+
margin: 10px 0;
|
|
217
|
+
padding-right: 2rem;
|
|
218
|
+
|
|
219
|
+
:global(.q-tab__label) {
|
|
220
|
+
font-size: 18px;
|
|
221
|
+
font-family: NunitoSansFont, sans-serif;
|
|
222
|
+
}
|
|
223
|
+
:global(.q-tab__icon) {
|
|
224
|
+
font-size: 33px;
|
|
225
|
+
width: 33px;
|
|
226
|
+
height: 33px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&::after {
|
|
230
|
+
content: '';
|
|
231
|
+
position: absolute;
|
|
232
|
+
bottom: -23px;
|
|
233
|
+
left: 15px;
|
|
234
|
+
height: 26px;
|
|
235
|
+
border: 1px solid #b9c0c7;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.tab:last-child {
|
|
241
|
+
:global(.q-tab__content) {
|
|
242
|
+
&::after {
|
|
243
|
+
display: none;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
</style>
|
|
248
|
+
|
|
249
|
+
<style lang="scss">
|
|
250
|
+
.app-sheet-actions {
|
|
251
|
+
button {
|
|
252
|
+
border-radius: 8px;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
</style>
|
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-expansion-item
|
|
3
|
-
v-if="item.items"
|
|
4
|
-
:model-value="isRouteActive(item) && expand"
|
|
5
|
-
header-class="text-purple"
|
|
6
|
-
:class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
|
|
7
|
-
:data-test="`sidebar-expansion-item-${(item.name || 'unnamed').toLowerCase().replace(/\s+/g, '-')}`"
|
|
8
|
-
@update:model-value="expand = $event"
|
|
9
|
-
>
|
|
10
|
-
<template #header>
|
|
11
|
-
<q-tooltip
|
|
12
|
-
v-if="minify"
|
|
13
|
-
:delay="100"
|
|
14
|
-
transition-show="jump-right"
|
|
15
|
-
transition-hide="jump-left"
|
|
16
|
-
anchor="center right"
|
|
17
|
-
self="center left"
|
|
18
|
-
>
|
|
19
|
-
{{ item.label }}
|
|
20
|
-
</q-tooltip>
|
|
21
|
-
|
|
22
|
-
<q-item-section v-if="item.icon" avatar>
|
|
23
|
-
<app-icon :name="item.icon" color="white" size="24px" />
|
|
24
|
-
</q-item-section>
|
|
25
|
-
|
|
26
|
-
<q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<sidebar-menu-item
|
|
30
|
-
v-for="(subItem, index) in item.items"
|
|
31
|
-
:key="index"
|
|
32
|
-
:item="subItem"
|
|
33
|
-
:main="main"
|
|
34
|
-
:is-route-active="isRouteActive"
|
|
35
|
-
/>
|
|
36
|
-
</q-expansion-item>
|
|
37
|
-
<q-item
|
|
38
|
-
v-else-if="item.name !== 'sign-out'"
|
|
39
|
-
v-ripple
|
|
40
|
-
:class="$style['menu-item']"
|
|
41
|
-
:active="isRouteActive(item)"
|
|
42
|
-
active-class="menu-active"
|
|
43
|
-
clickable
|
|
44
|
-
:to="main ? item.to : ''"
|
|
45
|
-
:data-test="`sidebar-item-${item.name.toLowerCase().replace(/\s+/g, '-')}`"
|
|
46
|
-
@click="goToRoute(item.to)"
|
|
47
|
-
>
|
|
48
|
-
<q-item-section v-if="item.icon" avatar>
|
|
49
|
-
<app-icon :name="item.icon" color="white" size="24px" />
|
|
50
|
-
</q-item-section>
|
|
51
|
-
|
|
52
|
-
<q-item-section :class="$style['menu-item__label']">
|
|
53
|
-
<p>{{ item.label }}</p>
|
|
54
|
-
</q-item-section>
|
|
55
|
-
<q-tooltip
|
|
56
|
-
:delay="100"
|
|
57
|
-
transition-show="jump-right"
|
|
58
|
-
transition-hide="jump-left"
|
|
59
|
-
anchor="center right"
|
|
60
|
-
self="center left"
|
|
61
|
-
>
|
|
62
|
-
{{ item.label }}
|
|
63
|
-
</q-tooltip>
|
|
64
|
-
</q-item>
|
|
65
|
-
</template>
|
|
66
|
-
|
|
67
|
-
<script lang="ts" setup>
|
|
68
|
-
import { defineProps, ref } from 'vue'
|
|
69
|
-
import AppIcon from '@/common/app-icon/AppIcon.vue'
|
|
70
|
-
|
|
71
|
-
interface Props {
|
|
72
|
-
minify?: boolean
|
|
73
|
-
main: boolean
|
|
74
|
-
isRouteActive: (item: any) => boolean
|
|
75
|
-
item: {
|
|
76
|
-
name: string
|
|
77
|
-
label: string
|
|
78
|
-
icon: string
|
|
79
|
-
href: string
|
|
80
|
-
to: string
|
|
81
|
-
items: any[]
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const emits = defineEmits(['goToRoute'])
|
|
86
|
-
const props = defineProps<Props>()
|
|
87
|
-
|
|
88
|
-
const expand = ref(true)
|
|
89
|
-
|
|
90
|
-
const goToRoute = (to: string) => {
|
|
91
|
-
if (!props.main) window.location.href = to
|
|
92
|
-
}
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<style lang="scss" scoped>
|
|
96
|
-
.expansion-item-active {
|
|
97
|
-
background: rgba(243, 249, 253, 0.1);
|
|
98
|
-
border-radius: 10px;
|
|
99
|
-
}
|
|
100
|
-
</style>
|
|
101
|
-
|
|
102
|
-
<style lang="scss" module>
|
|
103
|
-
.menu-item {
|
|
104
|
-
margin: 0 8px;
|
|
105
|
-
&:global(.menu-active) {
|
|
106
|
-
border-radius: 10px;
|
|
107
|
-
background: rgba(243, 249, 253, 0.1);
|
|
108
|
-
}
|
|
109
|
-
:global(.q-item__section--avatar) {
|
|
110
|
-
min-width: 24px;
|
|
111
|
-
padding-right: 14px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:global(.q-expansion-item__content .q-item) {
|
|
115
|
-
padding-left: 20px;
|
|
116
|
-
}
|
|
117
|
-
:global(.q-item__section--main ~ .q-item__section--side) {
|
|
118
|
-
color: white;
|
|
119
|
-
}
|
|
120
|
-
&__label {
|
|
121
|
-
color: #fff;
|
|
122
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
123
|
-
font-size: 16px;
|
|
124
|
-
font-weight: 300;
|
|
125
|
-
p {
|
|
126
|
-
display: inline-block;
|
|
127
|
-
max-width: 160px;
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
overflow: hidden;
|
|
130
|
-
text-overflow: ellipsis;
|
|
131
|
-
margin: 0;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@media (max-width: 1440px) {
|
|
137
|
-
.menu-item {
|
|
138
|
-
margin: 0 4px;
|
|
139
|
-
:global(.q-item__section--avatar) {
|
|
140
|
-
min-width: 24px;
|
|
141
|
-
padding-right: 10px;
|
|
142
|
-
}
|
|
143
|
-
&__label {
|
|
144
|
-
font-size: 14px;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-expansion-item
|
|
3
|
+
v-if="item.items"
|
|
4
|
+
:model-value="isRouteActive(item) && expand"
|
|
5
|
+
header-class="text-purple"
|
|
6
|
+
:class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
|
|
7
|
+
:data-test="`sidebar-expansion-item-${(item.name || 'unnamed').toLowerCase().replace(/\s+/g, '-')}`"
|
|
8
|
+
@update:model-value="expand = $event"
|
|
9
|
+
>
|
|
10
|
+
<template #header>
|
|
11
|
+
<q-tooltip
|
|
12
|
+
v-if="minify"
|
|
13
|
+
:delay="100"
|
|
14
|
+
transition-show="jump-right"
|
|
15
|
+
transition-hide="jump-left"
|
|
16
|
+
anchor="center right"
|
|
17
|
+
self="center left"
|
|
18
|
+
>
|
|
19
|
+
{{ item.label }}
|
|
20
|
+
</q-tooltip>
|
|
21
|
+
|
|
22
|
+
<q-item-section v-if="item.icon" avatar>
|
|
23
|
+
<app-icon :name="item.icon" color="white" size="24px" />
|
|
24
|
+
</q-item-section>
|
|
25
|
+
|
|
26
|
+
<q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<sidebar-menu-item
|
|
30
|
+
v-for="(subItem, index) in item.items"
|
|
31
|
+
:key="index"
|
|
32
|
+
:item="subItem"
|
|
33
|
+
:main="main"
|
|
34
|
+
:is-route-active="isRouteActive"
|
|
35
|
+
/>
|
|
36
|
+
</q-expansion-item>
|
|
37
|
+
<q-item
|
|
38
|
+
v-else-if="item.name !== 'sign-out'"
|
|
39
|
+
v-ripple
|
|
40
|
+
:class="$style['menu-item']"
|
|
41
|
+
:active="isRouteActive(item)"
|
|
42
|
+
active-class="menu-active"
|
|
43
|
+
clickable
|
|
44
|
+
:to="main ? item.to : ''"
|
|
45
|
+
:data-test="`sidebar-item-${item.name.toLowerCase().replace(/\s+/g, '-')}`"
|
|
46
|
+
@click="goToRoute(item.to)"
|
|
47
|
+
>
|
|
48
|
+
<q-item-section v-if="item.icon" avatar>
|
|
49
|
+
<app-icon :name="item.icon" color="white" size="24px" />
|
|
50
|
+
</q-item-section>
|
|
51
|
+
|
|
52
|
+
<q-item-section :class="$style['menu-item__label']">
|
|
53
|
+
<p>{{ item.label }}</p>
|
|
54
|
+
</q-item-section>
|
|
55
|
+
<q-tooltip
|
|
56
|
+
:delay="100"
|
|
57
|
+
transition-show="jump-right"
|
|
58
|
+
transition-hide="jump-left"
|
|
59
|
+
anchor="center right"
|
|
60
|
+
self="center left"
|
|
61
|
+
>
|
|
62
|
+
{{ item.label }}
|
|
63
|
+
</q-tooltip>
|
|
64
|
+
</q-item>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script lang="ts" setup>
|
|
68
|
+
import { defineProps, ref } from 'vue'
|
|
69
|
+
import AppIcon from '@/common/app-icon/AppIcon.vue'
|
|
70
|
+
|
|
71
|
+
interface Props {
|
|
72
|
+
minify?: boolean
|
|
73
|
+
main: boolean
|
|
74
|
+
isRouteActive: (item: any) => boolean
|
|
75
|
+
item: {
|
|
76
|
+
name: string
|
|
77
|
+
label: string
|
|
78
|
+
icon: string
|
|
79
|
+
href: string
|
|
80
|
+
to: string
|
|
81
|
+
items: any[]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const emits = defineEmits(['goToRoute'])
|
|
86
|
+
const props = defineProps<Props>()
|
|
87
|
+
|
|
88
|
+
const expand = ref(true)
|
|
89
|
+
|
|
90
|
+
const goToRoute = (to: string) => {
|
|
91
|
+
if (!props.main) window.location.href = to
|
|
92
|
+
}
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<style lang="scss" scoped>
|
|
96
|
+
.expansion-item-active {
|
|
97
|
+
background: rgba(243, 249, 253, 0.1);
|
|
98
|
+
border-radius: 10px;
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
|
|
102
|
+
<style lang="scss" module>
|
|
103
|
+
.menu-item {
|
|
104
|
+
margin: 0 8px;
|
|
105
|
+
&:global(.menu-active) {
|
|
106
|
+
border-radius: 10px;
|
|
107
|
+
background: rgba(243, 249, 253, 0.1);
|
|
108
|
+
}
|
|
109
|
+
:global(.q-item__section--avatar) {
|
|
110
|
+
min-width: 24px;
|
|
111
|
+
padding-right: 14px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:global(.q-expansion-item__content .q-item) {
|
|
115
|
+
padding-left: 20px;
|
|
116
|
+
}
|
|
117
|
+
:global(.q-item__section--main ~ .q-item__section--side) {
|
|
118
|
+
color: white;
|
|
119
|
+
}
|
|
120
|
+
&__label {
|
|
121
|
+
color: #fff;
|
|
122
|
+
font-family: 'Nunito Sans', sans-serif;
|
|
123
|
+
font-size: 16px;
|
|
124
|
+
font-weight: 300;
|
|
125
|
+
p {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
max-width: 160px;
|
|
128
|
+
white-space: nowrap;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
text-overflow: ellipsis;
|
|
131
|
+
margin: 0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (max-width: 1440px) {
|
|
137
|
+
.menu-item {
|
|
138
|
+
margin: 0 4px;
|
|
139
|
+
:global(.q-item__section--avatar) {
|
|
140
|
+
min-width: 24px;
|
|
141
|
+
padding-right: 10px;
|
|
142
|
+
}
|
|
143
|
+
&__label {
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
</style>
|