Skip to content

Commit dc3f116

Browse files
committed
fix(LeftBar): 去除不必要的 key
1 parent 8e7b49b commit dc3f116

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/pages/home/components/LeftBar.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,10 @@ onMounted(() => {
217217
</div>
218218
<Transition name="menu">
219219
<ul class="py-[3px] flex nav-container" v-show="item1.show">
220-
<template v-for="item2 in item1.children">
220+
<template v-for="(item2, index) in item1.children">
221221
<router-link
222222
v-if="!item2.link.startsWith('http')"
223223
:to="item2.link"
224-
:key="item2.title"
225224
:href="item2.link"
226225
:class="{
227226
'bg-[#dcdcdc]': $route.path
@@ -234,7 +233,6 @@ onMounted(() => {
234233
<a
235234
v-else
236235
:href="item2.link"
237-
:key="index + 1"
238236
:class="{
239237
'bg-[#dcdcdc]': $route.path
240238
.trim()

0 commit comments

Comments
 (0)