@ulu/frontend-vue 0.5.16 → 0.6.1
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/components/elements/UluBadge.vue.d.ts +2 -0
- package/dist/components/elements/UluBadge.vue.d.ts.map +1 -1
- package/dist/components/elements/UluBadge.vue.js +30 -21
- package/dist/components/elements/UluButton.vue.d.ts +4 -0
- package/dist/components/elements/UluButton.vue.d.ts.map +1 -1
- package/dist/components/elements/UluButton.vue.js +31 -16
- package/dist/components/elements/UluIcon.vue.js +21 -36
- package/dist/components/forms/UluFormCheckbox.vue.d.ts +3 -19
- package/dist/components/forms/UluFormCheckbox.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormCheckbox.vue.js +10 -31
- package/dist/components/forms/UluFormFile.vue.d.ts +3 -25
- package/dist/components/forms/UluFormFile.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormFile.vue.js +11 -49
- package/dist/components/forms/UluFormItem.vue.d.ts +23 -8
- package/dist/components/forms/UluFormItem.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormItem.vue.js +126 -29
- package/dist/components/forms/UluFormLabel.vue.d.ts +24 -0
- package/dist/components/forms/UluFormLabel.vue.d.ts.map +1 -0
- package/dist/components/forms/UluFormLabel.vue.js +34 -0
- package/dist/components/forms/UluFormRadio.vue.d.ts +7 -25
- package/dist/components/forms/UluFormRadio.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormRadio.vue.js +11 -37
- package/dist/components/forms/UluFormSelect.vue.d.ts +7 -23
- package/dist/components/forms/UluFormSelect.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormSelect.vue.js +24 -43
- package/dist/components/forms/UluFormText.vue.d.ts +5 -23
- package/dist/components/forms/UluFormText.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormText.vue.js +10 -38
- package/dist/components/forms/UluFormTextarea.vue.d.ts +5 -23
- package/dist/components/forms/UluFormTextarea.vue.d.ts.map +1 -1
- package/dist/components/forms/UluFormTextarea.vue.js +10 -37
- package/dist/components/forms/UluSearchForm.vue.d.ts +24 -3
- package/dist/components/forms/UluSearchForm.vue.d.ts.map +1 -1
- package/dist/components/forms/UluSearchForm.vue.js +67 -22
- package/dist/components/index.d.ts +1 -0
- package/dist/components/systems/facets/UluFacetsFilterSelects.vue.d.ts.map +1 -1
- package/dist/components/systems/facets/UluFacetsFilterSelects.vue.js +21 -22
- package/dist/components/systems/facets/useFacets.d.ts.map +1 -1
- package/dist/components/systems/scroll-anchors/useScrollAnchorSection.d.ts.map +1 -1
- package/dist/components/systems/scroll-anchors/useScrollAnchorSections.d.ts.map +1 -1
- package/dist/components/systems/scroll-anchors/useScrollAnchors.d.ts.map +1 -1
- package/dist/components/utils/UluAction.vue.d.ts +2 -0
- package/dist/components/utils/UluAction.vue.d.ts.map +1 -1
- package/dist/components/utils/UluAction.vue.js +9 -5
- package/dist/components/visualizations/UluProgressBar.vue.d.ts +2 -2
- package/dist/composables/useBreakpointManager.d.ts.map +1 -1
- package/dist/composables/useDocumentTitle.d.ts.map +1 -1
- package/dist/composables/useIcon.d.ts +3 -0
- package/dist/composables/useIcon.d.ts.map +1 -1
- package/dist/composables/useModifiers.d.ts.map +1 -1
- package/dist/composables/usePagination.d.ts.map +1 -1
- package/dist/composables/useRequiredInject.d.ts.map +1 -1
- package/dist/composables/useTableData.d.ts.map +1 -1
- package/dist/composables/useUluFloating.d.ts.map +1 -1
- package/dist/composables/useWindowResize.d.ts.map +1 -1
- package/dist/index.js +130 -128
- package/dist/mcp-data.json +17685 -0
- package/dist/plugins/breakpoints/index.d.ts.map +1 -1
- package/dist/plugins/core/index.d.ts.map +1 -1
- package/dist/plugins/core/index.js +17 -16
- package/dist/plugins/modals/api.d.ts.map +1 -1
- package/dist/plugins/modals/index.d.ts.map +1 -1
- package/dist/plugins/modals/useModals.d.ts.map +1 -1
- package/dist/plugins/popovers/defaults.d.ts.map +1 -1
- package/dist/plugins/popovers/index.d.ts.map +1 -1
- package/dist/plugins/popovers/useTooltip.d.ts.map +1 -1
- package/dist/plugins/popovers/useTooltipFollow.d.ts.map +1 -1
- package/dist/plugins/toast/index.d.ts.map +1 -1
- package/dist/plugins/toast/store.d.ts.map +1 -1
- package/dist/plugins/toast/useToast.d.ts.map +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +3 -0
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/props.d.ts +10 -0
- package/dist/utils/props.d.ts.map +1 -1
- package/dist/utils/props.js +8 -2
- package/dist/utils/router.d.ts +12 -15
- package/dist/utils/router.d.ts.map +1 -1
- package/lib/components/elements/UluBadge.vue +16 -5
- package/lib/components/elements/UluButton.vue +18 -3
- package/lib/components/elements/UluIcon.vue +8 -26
- package/lib/components/forms/UluForm.vue +25 -25
- package/lib/components/forms/UluFormCheckbox.vue +11 -25
- package/lib/components/forms/UluFormFieldset.vue +6 -6
- package/lib/components/forms/UluFormFile.vue +10 -40
- package/lib/components/forms/UluFormItem.vue +150 -39
- package/lib/components/forms/UluFormLabel.vue +30 -0
- package/lib/components/forms/UluFormRadio.vue +15 -34
- package/lib/components/forms/UluFormSelect.vue +19 -24
- package/lib/components/forms/UluFormText.vue +7 -25
- package/lib/components/forms/UluFormTextarea.vue +7 -25
- package/lib/components/forms/UluSearchForm.vue +67 -19
- package/lib/components/forms/UluSelectableMenu.vue +62 -62
- package/lib/components/index.js +4 -0
- package/lib/components/systems/facets/UluFacetsFilterSelects.vue +11 -14
- package/lib/components/systems/facets/useFacets.js +3 -0
- package/lib/components/systems/index.js +3 -0
- package/lib/components/systems/scroll-anchors/useScrollAnchorSection.js +3 -0
- package/lib/components/systems/scroll-anchors/useScrollAnchorSections.js +3 -0
- package/lib/components/systems/scroll-anchors/useScrollAnchors.js +3 -0
- package/lib/components/utils/UluAction.vue +6 -2
- package/lib/composables/useBreakpointManager.js +3 -0
- package/lib/composables/useDocumentTitle.js +3 -0
- package/lib/composables/useIcon.js +3 -0
- package/lib/composables/useModifiers.js +3 -1
- package/lib/composables/usePagination.js +3 -0
- package/lib/composables/useRequiredInject.js +3 -0
- package/lib/composables/useTableData.js +3 -0
- package/lib/composables/useUluFloating.js +3 -0
- package/lib/composables/useWindowResize.js +3 -0
- package/lib/index.js +1 -1
- package/lib/meta.js +1 -1
- package/lib/plugins/breakpoints/index.js +3 -0
- package/lib/plugins/core/index.js +4 -2
- package/lib/plugins/index.js +1 -1
- package/lib/plugins/modals/api.js +3 -0
- package/lib/plugins/modals/index.js +2 -3
- package/lib/plugins/modals/useModals.js +3 -0
- package/lib/plugins/popovers/defaults.js +3 -0
- package/lib/plugins/popovers/index.js +3 -0
- package/lib/plugins/popovers/useTooltip.js +3 -0
- package/lib/plugins/popovers/useTooltipFollow.js +3 -0
- package/lib/plugins/toast/defaults.js +3 -0
- package/lib/plugins/toast/index.js +3 -0
- package/lib/plugins/toast/store.js +3 -0
- package/lib/plugins/toast/useToast.js +3 -0
- package/lib/resolver.js +3 -0
- package/lib/utils/dom.js +3 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/props.js +17 -0
- package/lib/utils/router.js +10 -10
- package/lib/vite.js +3 -0
- package/package.json +19 -6
|
@@ -32,75 +32,75 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script setup>
|
|
35
|
-
import { computed } from 'vue';
|
|
35
|
+
import { computed } from 'vue';
|
|
36
36
|
|
|
37
|
-
const props = defineProps({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
37
|
+
const props = defineProps({
|
|
38
|
+
/**
|
|
39
|
+
* The legend for the menu.
|
|
40
|
+
*/
|
|
41
|
+
legend: String,
|
|
42
|
+
/**
|
|
43
|
+
* An array of options for the menu.
|
|
44
|
+
*/
|
|
45
|
+
options: Array,
|
|
46
|
+
/**
|
|
47
|
+
* Use compact modifier on menu stack
|
|
48
|
+
*/
|
|
49
|
+
compact: Boolean,
|
|
50
|
+
/**
|
|
51
|
+
* The type of input to use ('checkbox' or 'radio').
|
|
52
|
+
*/
|
|
53
|
+
type: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'checkbox',
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* The value of the menu (for v-model).
|
|
59
|
+
*/
|
|
60
|
+
modelValue: [String, Array],
|
|
61
|
+
/**
|
|
62
|
+
* If true, the input elements will be visually hidden.
|
|
63
|
+
*/
|
|
64
|
+
hideInputs: Boolean
|
|
65
|
+
});
|
|
66
66
|
|
|
67
|
-
const emit = defineEmits(['update:modelValue']);
|
|
67
|
+
const emit = defineEmits(['update:modelValue']);
|
|
68
68
|
|
|
69
|
-
const name = computed(() => props.legend ? props.legend.toLowerCase().replace(/\s+/g, '-') : `menu-${ Math.random().toString(36).substring(7) }`);
|
|
70
|
-
const legendId = computed(() => name.value ? `${name.value}-legend` : null);
|
|
71
|
-
const groupRole = computed(() => props.type === 'radio' ? 'radiogroup' : 'group');
|
|
69
|
+
const name = computed(() => props.legend ? props.legend.toLowerCase().replace(/\s+/g, '-') : `menu-${ Math.random().toString(36).substring(7) }`);
|
|
70
|
+
const legendId = computed(() => name.value ? `${name.value}-legend` : null);
|
|
71
|
+
const groupRole = computed(() => props.type === 'radio' ? 'radiogroup' : 'group');
|
|
72
72
|
|
|
73
|
-
const getId = (option) => `${name.value}-${option.uid}`;
|
|
73
|
+
const getId = (option) => `${name.value}-${option.uid}`;
|
|
74
74
|
|
|
75
|
-
const isChecked = (option) => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (Array.isArray(props.modelValue)) {
|
|
80
|
-
return props.modelValue.includes(option.uid);
|
|
81
|
-
}
|
|
82
|
-
if (props.type === 'checkbox') {
|
|
83
|
-
return option.checked || false;
|
|
84
|
-
}
|
|
85
|
-
return false;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const handleChange = (option, event) => {
|
|
89
|
-
if (props.type === 'radio') {
|
|
90
|
-
emit('update:modelValue', option.uid);
|
|
91
|
-
} else {
|
|
75
|
+
const isChecked = (option) => {
|
|
76
|
+
if (props.type === 'radio') {
|
|
77
|
+
return props.modelValue === option.uid;
|
|
78
|
+
}
|
|
92
79
|
if (Array.isArray(props.modelValue)) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
80
|
+
return props.modelValue.includes(option.uid);
|
|
81
|
+
}
|
|
82
|
+
if (props.type === 'checkbox') {
|
|
83
|
+
return option.checked || false;
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const handleChange = (option, event) => {
|
|
89
|
+
if (props.type === 'radio') {
|
|
90
|
+
emit('update:modelValue', option.uid);
|
|
91
|
+
} else {
|
|
92
|
+
if (Array.isArray(props.modelValue)) {
|
|
93
|
+
const newValue = [...props.modelValue];
|
|
94
|
+
const index = newValue.indexOf(option.uid);
|
|
95
|
+
if (index > -1) {
|
|
96
|
+
newValue.splice(index, 1);
|
|
97
|
+
} else {
|
|
98
|
+
newValue.push(option.uid);
|
|
99
|
+
}
|
|
100
|
+
emit('update:modelValue', newValue);
|
|
97
101
|
} else {
|
|
98
|
-
|
|
102
|
+
option.checked = event.target.checked;
|
|
99
103
|
}
|
|
100
|
-
emit('update:modelValue', newValue);
|
|
101
|
-
} else {
|
|
102
|
-
option.checked = event.target.checked;
|
|
103
104
|
}
|
|
104
|
-
}
|
|
105
|
-
};
|
|
105
|
+
};
|
|
106
106
|
</script>
|
package/lib/components/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module components
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* @module components/index.js
|
|
3
6
|
* Responsible for exporting all components
|
|
@@ -56,6 +59,7 @@ export { default as UluFormActions } from './forms/UluFormActions.vue';
|
|
|
56
59
|
export { default as UluFormCheckbox } from './forms/UluFormCheckbox.vue';
|
|
57
60
|
export { default as UluFormFieldset } from './forms/UluFormFieldset.vue';
|
|
58
61
|
export { default as UluFormItem } from './forms/UluFormItem.vue';
|
|
62
|
+
export { default as UluFormLabel } from './forms/UluFormLabel.vue';
|
|
59
63
|
export { default as UluFormItemsInline } from './forms/UluFormItemsInline.vue';
|
|
60
64
|
export { default as UluFormRadio } from './forms/UluFormRadio.vue';
|
|
61
65
|
export { default as UluFormRequiredChar } from './forms/UluFormRequiredChar.vue';
|
|
@@ -59,9 +59,6 @@ const props = defineProps({
|
|
|
59
59
|
},
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
console.log(props);
|
|
63
|
-
|
|
64
|
-
|
|
65
62
|
const emit = defineEmits(['facet-change']);
|
|
66
63
|
|
|
67
64
|
function onFilterChange(group, event) {
|
|
@@ -84,15 +81,15 @@ function onFilterChange(group, event) {
|
|
|
84
81
|
</script>
|
|
85
82
|
|
|
86
83
|
<style lang="scss">
|
|
87
|
-
.facets-dropdown-filters {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
.facets-dropdown-filters__group {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
84
|
+
.facets-dropdown-filters {
|
|
85
|
+
display: flex;
|
|
86
|
+
gap: 1rem;
|
|
87
|
+
align-items: center;
|
|
88
|
+
flex-wrap: wrap;
|
|
89
|
+
}
|
|
90
|
+
.facets-dropdown-filters__group {
|
|
91
|
+
display: flex;
|
|
92
|
+
gap: 0.5rem;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
98
95
|
</style>
|
|
@@ -48,7 +48,11 @@
|
|
|
48
48
|
* Allows passing 'click' as a prop to signify this is an action (used in UluMenu data objects).
|
|
49
49
|
* Note: The actual @click listener should be attached via fallthrough attrs, this is just for logic routing.
|
|
50
50
|
*/
|
|
51
|
-
click: Function
|
|
51
|
+
click: Function,
|
|
52
|
+
/**
|
|
53
|
+
* Button type (e.g. 'submit', 'reset', 'button'). Defaults to 'button' to prevent accidental form submissions.
|
|
54
|
+
*/
|
|
55
|
+
type: String
|
|
52
56
|
});
|
|
53
57
|
|
|
54
58
|
const resolvedElement = computed(() => {
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
}
|
|
74
78
|
} else if (!props.element || props.element === "button") {
|
|
75
79
|
// It's a button, ensure it doesn't accidentally submit forms unless requested
|
|
76
|
-
attrs.type = "button";
|
|
80
|
+
attrs.type = props.type || "button";
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
return attrs;
|
package/lib/index.js
CHANGED
package/lib/meta.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module
|
|
2
|
+
* @module corePlugin
|
|
3
3
|
* @description Core plugin for managing shared configuration for the library.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
import { reactive } from 'vue';
|
|
6
7
|
|
|
7
8
|
const defaults = {
|
|
@@ -27,7 +28,8 @@ const defaults = {
|
|
|
27
28
|
file: "fas fa-file",
|
|
28
29
|
previous: "fas fa-chevron-left",
|
|
29
30
|
next: "fas fa-chevron-right",
|
|
30
|
-
dropdownExpand: "fas fa-caret-down"
|
|
31
|
+
dropdownExpand: "fas fa-caret-down",
|
|
32
|
+
search: "fas fa-search"
|
|
31
33
|
}
|
|
32
34
|
};
|
|
33
35
|
|
package/lib/plugins/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module
|
|
3
|
-
* @
|
|
4
|
-
* Modals plugin (adds components, global registry, etc)
|
|
2
|
+
* @module modalsPlugin
|
|
3
|
+
* @description Modals plugin (adds components, global registry, etc)
|
|
5
4
|
* - Updated version handles both independent and global registered/triggered modals
|
|
6
5
|
*/
|
|
7
6
|
|
package/lib/resolver.js
CHANGED
package/lib/utils/dom.js
CHANGED
package/lib/utils/index.js
CHANGED
package/lib/utils/props.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module utils.props
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* Ensures the array consists of objects
|
|
3
6
|
* @param {Array} array Array to check
|
|
@@ -5,4 +8,18 @@
|
|
|
5
8
|
*/
|
|
6
9
|
export function isArrayOfObjects(array) {
|
|
7
10
|
return array.every(item => typeof item === "object");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Checks for deprecated props and calls a callback for each match
|
|
15
|
+
* @param {object} props - The current props object
|
|
16
|
+
* @param {string[]} deprecatedNames - Array of prop names to check
|
|
17
|
+
* @param {function} callback - Function called for each match, receiving the prop name
|
|
18
|
+
*/
|
|
19
|
+
export function checkDeprecatedProps(props, deprecatedNames, callback) {
|
|
20
|
+
deprecatedNames.forEach(name => {
|
|
21
|
+
if (props[name] !== undefined) {
|
|
22
|
+
callback(name);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
8
25
|
}
|
package/lib/utils/router.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* - Note: Functions prefixed with "$" work with $route objects (running application, provided by vue-router ie $router, useRoute, etc),
|
|
4
|
-
* @module router-utils
|
|
2
|
+
* @module utils.router
|
|
5
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* This Module Creates Menus from route or router config
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Resolves a route's title from its meta.
|
|
@@ -37,7 +37,7 @@ export function getRouteTitle(route, currentRoute) {
|
|
|
37
37
|
* @param {Object} options Options
|
|
38
38
|
* @param {Object} options.qualifier Callback to qualify as a base route (defaults to isStaticBaseRoute)
|
|
39
39
|
* @param {Object} options.item Options for createMenuItem
|
|
40
|
-
* @returns {Array
|
|
40
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
41
41
|
*/
|
|
42
42
|
export function createBaseMenu(routes, options) {
|
|
43
43
|
const defaults = {
|
|
@@ -97,9 +97,9 @@ export function flattenMenu(menu) {
|
|
|
97
97
|
* @param {*} routes All routes
|
|
98
98
|
* @param {*} sectionPath Path for section to create menu
|
|
99
99
|
* @param {Object} options Options
|
|
100
|
-
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie
|
|
100
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie path: ""
|
|
101
101
|
* @param {Object} options.item Options to be passed to createMenuItem
|
|
102
|
-
* @returns {Array
|
|
102
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
103
103
|
*/
|
|
104
104
|
export function createSectionMenu(routes, sectionPath, options) {
|
|
105
105
|
const defaults = {
|
|
@@ -190,7 +190,7 @@ export function isStaticBaseRoute(route) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
* Function to make normal
|
|
193
|
+
* Function to make normal `<a>` behave as router links instread of page reload
|
|
194
194
|
* @param {Object} router Router instance (ie src/router) to push routes to
|
|
195
195
|
* @param {Object} event The event object that triggered route change (ie. onclick) pass event object
|
|
196
196
|
*/
|
|
@@ -246,9 +246,9 @@ function sortByWeight(a, b) {
|
|
|
246
246
|
* @param {Object} route Actual $route object
|
|
247
247
|
* @param {Object} options Options
|
|
248
248
|
* @param {Object} options.parent Route parent object, defaults to parent of route
|
|
249
|
-
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie
|
|
249
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie path: ""
|
|
250
250
|
* @param {Object} options.item Options for createMenuItem
|
|
251
|
-
* @returns {Array
|
|
251
|
+
* @returns {Array<RouteMenuItem>} Array of menu items
|
|
252
252
|
*/
|
|
253
253
|
export function $createSectionMenu(route, options) {
|
|
254
254
|
const defaults = {
|
|
@@ -273,7 +273,7 @@ export function $createSectionMenu(route, options) {
|
|
|
273
273
|
* - Skips routes where `meta.breadcrumb` is set to `false`.
|
|
274
274
|
* - Avoids duplicate crumbs for nested routes with empty paths.
|
|
275
275
|
* @param {Object} route The Vue Router `$route` object.
|
|
276
|
-
* @returns {Array
|
|
276
|
+
* @returns {Array<Object>} An array of breadcrumb items with title, to, and current properties.
|
|
277
277
|
*/
|
|
278
278
|
export function $createBreadcrumb(route) {
|
|
279
279
|
const { matched, path: currentPath } = route;
|