add some router-link
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<Button icon="pi pi-plus" type="button" pButton @click="incrementScale()" class="p-button-text p-button-rounded w-2rem h-2rem ml-2" :disabled="layoutConfig.scale.value === scales[scales.length - 1]"></Button>
|
||||
</div>
|
||||
|
||||
<template v-if="!minimal">
|
||||
<template v-if="true">
|
||||
<h5>Menu Type</h5>
|
||||
<div class="field-radiobutton">
|
||||
<RadioButton name="menuMode" value="static" v-model="layoutConfig.menuMode.value" inputId="mode1"></RadioButton>
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="!minimal">
|
||||
<template v-if="true">
|
||||
<h5>Input Style</h5>
|
||||
<div class="flex">
|
||||
<div class="field-radiobutton flex-1">
|
||||
|
||||
@@ -7,7 +7,6 @@ const route = useRoute();
|
||||
|
||||
const { layoutConfig, setActiveMenuItem } = useLayoutService();
|
||||
|
||||
const show = ref(true);
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
@@ -30,13 +29,8 @@ const props = defineProps({
|
||||
const isActiveMenu = ref(false);
|
||||
const itemKey = ref(null);
|
||||
onBeforeMount(() => {
|
||||
if (!props.root) {
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
itemKey.value = props.parentItemKey ? props.parentItemKey + '-' + props.index : String(props.index);
|
||||
|
||||
console.log();
|
||||
isActiveMenu.value = layoutConfig.activeMenuItem.value === itemKey.value || layoutConfig.activeMenuItem?.value?.startsWith(itemKey.value + '-');
|
||||
});
|
||||
watch(
|
||||
@@ -50,12 +44,7 @@ const itemClick = (event, item) => {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (!item.to && !item.url) {
|
||||
if (item.items) {
|
||||
show.value = !show.value;
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
//execute command
|
||||
if (item.command) {
|
||||
item.command({ originalEvent: event, item: item });
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
<i class="pi pi-user"></i>
|
||||
<span>Profile</span>
|
||||
</button>
|
||||
<button class="p-link layout-topbar-button">
|
||||
<router-link to="/documentation" class="p-link layout-topbar-button">
|
||||
<i class="pi pi-cog"></i>
|
||||
<span>Settings</span>
|
||||
</button>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user