fix: 修复在vue-router 的模式hash复制路径不对
parent
37d72c1628
commit
e4453841db
|
|
@ -84,50 +84,53 @@ onBeforeUnmount(() => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<a
|
<router-link
|
||||||
:href="
|
v-slot="{ href }"
|
||||||
|
custom
|
||||||
|
:to="
|
||||||
(item.parentPaths.at(-1) ?? '') +
|
(item.parentPaths.at(-1) ?? '') +
|
||||||
(item?.query ? `?${qs.stringify(item?.query)}` : '')
|
(item?.query ? `?${qs.stringify(item?.query)}` : '')
|
||||||
"
|
"
|
||||||
@click.prevent.stop="handleClick"
|
|
||||||
>
|
>
|
||||||
<li
|
<a :href="href" @click.prevent.stop="handleClick">
|
||||||
:class="[
|
<li
|
||||||
rootMenu.theme,
|
:class="[
|
||||||
b(),
|
rootMenu.theme,
|
||||||
is('active', active),
|
b(),
|
||||||
is('disabled', disabled),
|
is('active', active),
|
||||||
is('collapse-show-title', collapseShowTitle),
|
is('disabled', disabled),
|
||||||
]"
|
is('collapse-show-title', collapseShowTitle),
|
||||||
role="menuitem"
|
]"
|
||||||
>
|
role="menuitem"
|
||||||
<!-- -->
|
|
||||||
<VbenTooltip
|
|
||||||
v-if="showTooltip"
|
|
||||||
:content-class="[rootMenu.theme]"
|
|
||||||
side="right"
|
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<!-- -->
|
||||||
<div :class="[nsMenu.be('tooltip', 'trigger')]">
|
<VbenTooltip
|
||||||
<VbenIcon :class="nsMenu.e('icon')" :icon="menuIcon" fallback />
|
v-if="showTooltip"
|
||||||
<slot></slot>
|
:content-class="[rootMenu.theme]"
|
||||||
<span v-if="collapseShowTitle" :class="nsMenu.e('name')">
|
side="right"
|
||||||
<slot name="title"></slot>
|
>
|
||||||
</span>
|
<template #trigger>
|
||||||
</div>
|
<div :class="[nsMenu.be('tooltip', 'trigger')]">
|
||||||
</template>
|
<VbenIcon :class="nsMenu.e('icon')" :icon="menuIcon" fallback />
|
||||||
<slot name="title"></slot>
|
<slot></slot>
|
||||||
</VbenTooltip>
|
<span v-if="collapseShowTitle" :class="nsMenu.e('name')">
|
||||||
<div v-show="!showTooltip" :class="[e('content')]">
|
<slot name="title"></slot>
|
||||||
<MenuBadge
|
</span>
|
||||||
v-if="rootMenu.props.mode !== 'horizontal'"
|
</div>
|
||||||
class="right-2"
|
</template>
|
||||||
v-bind="props"
|
<slot name="title"></slot>
|
||||||
/>
|
</VbenTooltip>
|
||||||
<VbenIcon :class="nsMenu.e('icon')" :icon="menuIcon" />
|
<div v-show="!showTooltip" :class="[e('content')]">
|
||||||
<slot></slot>
|
<MenuBadge
|
||||||
<slot name="title"></slot>
|
v-if="rootMenu.props.mode !== 'horizontal'"
|
||||||
</div>
|
class="right-2"
|
||||||
</li>
|
v-bind="props"
|
||||||
</a>
|
/>
|
||||||
|
<VbenIcon :class="nsMenu.e('icon')" :icon="menuIcon" />
|
||||||
|
<slot></slot>
|
||||||
|
<slot name="title"></slot>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue