mediacube-ui 0.1.404 → 0.1.406
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.
|
@@ -116,11 +116,13 @@ export default {
|
|
|
116
116
|
icon: [String] - icon,
|
|
117
117
|
to: [String] - route path (used like link if this route haven't nested menu if they isn't they work like button who open nested menu),
|
|
118
118
|
info: [String] - info badge text
|
|
119
|
+
is_active? [Boolean] - button active status
|
|
119
120
|
route_name?: [String] - extra field if route should be active even if it has extra params applied (route_name === 'page-index-format')
|
|
120
121
|
menu: [
|
|
121
122
|
{
|
|
122
123
|
name: [String] - menu item title,
|
|
123
124
|
to: [String] - route path,
|
|
125
|
+
is_active? [Boolean] - button active status
|
|
124
126
|
info: [String] - info badge text,
|
|
125
127
|
route_name?: [String]
|
|
126
128
|
},
|
|
@@ -248,14 +250,18 @@ export default {
|
|
|
248
250
|
this.loading = true
|
|
249
251
|
this.preparedMainMenu = this.menuMain.map(i => {
|
|
250
252
|
const active = () => {
|
|
251
|
-
return
|
|
253
|
+
return (
|
|
254
|
+
i?.menu?.some(r => this.checkRoute(r, this.$route)) ||
|
|
255
|
+
this.checkRoute(i, this.$route) ||
|
|
256
|
+
i.is_active
|
|
257
|
+
)
|
|
252
258
|
}
|
|
253
259
|
return {
|
|
254
260
|
id: _XEUtils.uniqueId(),
|
|
255
261
|
...i,
|
|
256
262
|
menu: i.menu?.map(item => ({
|
|
257
263
|
...item,
|
|
258
|
-
active: () => this.checkRoute(item, this.$route),
|
|
264
|
+
active: () => this.checkRoute(item, this.$route) || item.is_active,
|
|
259
265
|
})),
|
|
260
266
|
active,
|
|
261
267
|
indicator: () => i.menu?.some(r => !!this.counts?.[r.count_key]),
|