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> </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"
> >
<a :href="href" @click.prevent.stop="handleClick">
<li <li
:class="[ :class="[
rootMenu.theme, rootMenu.theme,
@ -130,4 +132,5 @@ onBeforeUnmount(() => {
</div> </div>
</li> </li>
</a> </a>
</router-link>
</template> </template>