fix: 修复在vue-router 的模式hash复制路径不对

pull/337/head^2
lmx 2026-03-16 01:32:11 +08:00
parent 37d72c1628
commit e4453841db
1 changed files with 44 additions and 41 deletions

View File

@ -84,13 +84,15 @@ onBeforeUnmount(() => {
});
</script>
<template>
<a
:href="
<router-link
v-slot="{ href }"
custom
:to="
(item.parentPaths.at(-1) ?? '') +
(item?.query ? `?${qs.stringify(item?.query)}` : '')
"
@click.prevent.stop="handleClick"
>
<a :href="href" @click.prevent.stop="handleClick">
<li
:class="[
rootMenu.theme,
@ -130,4 +132,5 @@ onBeforeUnmount(() => {
</div>
</li>
</a>
</router-link>
</template>