Welcome to mirror list, hosted at ThFree Co, Russian Federation.

table_of_contents_heading.vue « wrappers « components « content_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: edd75d232e87d11a74fd6e194c5f2659e2f1801f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<script>
export default {
  name: 'TableOfContentsHeading',
  props: {
    heading: {
      type: Object,
      required: true,
    },
  },
};
</script>
<template>
  <li>
    <a v-if="heading.text" href="#" @click.prevent>
      {{ heading.text }}
    </a>
    <ul v-if="heading.subHeadings.length">
      <table-of-contents-heading
        v-for="(child, index) in heading.subHeadings"
        :key="index"
        :heading="child"
      />
    </ul>
  </li>
</template>