Skip to content

Commit 7f2ba69

Browse files
CopilotNiraj Acharya
authored andcommitted
fix(TOC): add name option, rename class to toc--item for sidebar styling
1 parent ce9a6fb commit 7f2ba69

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/components/detail/TOC.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<div v-for="item in toc" :key="item.id" class="toc-item" :style="{ paddingLeft: item.val * 0.2 + 'em' }">
3+
<div v-for="item in toc" :key="item.id" :style="{ paddingLeft: item.val * 0.2 + 'em' }">
44

55
<div class="toc-content" @click="scrollToHeading(item.id, $event)">
66

@@ -57,10 +57,10 @@ const scrollToHeading = (headingId, e) => {
5757
})
5858
}
5959
</script>
60+
<script>
61+
export default { name: "TOC" }
62+
</script>
6063
<style scoped>
61-
.toc-item {
62-
user-select: none;
63-
}
6464
6565
.toc-content {
6666
display: flex;

0 commit comments

Comments
 (0)