mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Refactor #3965 - Update CascadeSelect and Breadcrumb
This commit is contained in:
parent
698431db44
commit
a556b46e48
8 changed files with 65 additions and 74 deletions
|
@ -41,19 +41,19 @@ const classes = {
|
|||
menu: 'p-breadcrumb-list',
|
||||
home: 'p-breadcrumb-home',
|
||||
separator: 'p-menuitem-separator',
|
||||
menuitem: ({ context }) => ['p-menuitem', { 'p-disabled': context.disabled() }],
|
||||
action: ({ context, isActive, isExactActive }) => [
|
||||
menuitem: ({ instance }) => ['p-menuitem', { 'p-disabled': instance.disabled() }],
|
||||
action: ({ instance, isActive, isExactActive }) => [
|
||||
'p-menuitem-link',
|
||||
{
|
||||
'router-link-active': isActive,
|
||||
'router-link-active-exact': context.exact && isExactActive
|
||||
'router-link-active-exact': instance.exact && isExactActive
|
||||
}
|
||||
],
|
||||
icon: 'p-menuitem-icon',
|
||||
label: 'p-menuitem-text'
|
||||
};
|
||||
|
||||
const { load: loadStyle, unload: unloadStyle } = useStyle(styles, { id: 'primevue_breadcrumb_style', manual: true });
|
||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_breadcrumb_style', manual: true });
|
||||
|
||||
export default {
|
||||
name: 'BaseBreadcrumb',
|
||||
|
@ -73,15 +73,13 @@ export default {
|
|||
}
|
||||
},
|
||||
css: {
|
||||
classes
|
||||
classes,
|
||||
loadStyle
|
||||
},
|
||||
watch: {
|
||||
isUnstyled: {
|
||||
immediate: true,
|
||||
handler(newValue) {
|
||||
!newValue && loadStyle();
|
||||
}
|
||||
}
|
||||
provide() {
|
||||
return {
|
||||
$parentInstance: this
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue