Skip to content

Commit

Permalink
更新面包屑
Browse files Browse the repository at this point in the history
Co-Authored-By: JDSA Ling <70191651+LingASDJ@users.noreply.github.com>
  • Loading branch information
mason369 and LingASDJ committed Jan 20, 2023
1 parent 6ae7869 commit 4aa9ab0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
31 changes: 26 additions & 5 deletions src/components/Crumb.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
<template>
<div>
面包屑
</div>
<div class="crumb">
<span>
<span
:style="{ color: index === nav.length - 1 ? '#333' : '#999' }"
v-for="(item, index) in nav"
:key="index"
>
{{ item.name }}
<i v-if="index != nav.length - 1">/</i>
</span>
</span>
</div>
</template>

<script>
export default {}
export default {
name : "Crumb",
props: ["nav"],
data() {
return {};
}
};
</script>

<style lang="scss" scoped>
.crumb {
font-size: 14px;
margin: 10px 0;
i {
margin: 0 5px;
}
}
</style>
2 changes: 1 addition & 1 deletion src/views/Details.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="details wrap">
<Crumb></Crumb>
<Crumb :nav="nav"></Crumb>
<main>
<div class="content">
<div class="l">
Expand Down

0 comments on commit 4aa9ab0

Please sign in to comment.