2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00
Files
vue-select/docs/.vuepress/generateApiDocs/components/ApiSlots.vue
T

48 lines
1.0 KiB
Vue

<template>
<div>
<ul>
<li v-for="slot in slots">
<h2 :id="slot.name">
<a :href="`#${slot.name}`" aria-hidden="true" class="header-anchor">#</a>
{{ slot.name }}
</h2>
<ul v-if="slot.bindings">
<li>
<h4>Bindings</h4>
</li>
<li v-for="(key, value) in slot.bindings">
<code>{{value}}: {{key}}</code>
</li>
</ul>
<pre><code v-html="slot.rendered"></code></pre>
<Content :slot-key="slot.name"></Content>
</li>
</ul>
</div>
</template>
<script>
import docs from "@dynamic/api";
import markdown from "../utils/markdown";
import highlight from "../utils/highlight";
export default {
name: "ApiSlots",
methods: {
markdown
},
computed: {
slots() {
return docs.slots
.map(slot => ({
...slot,
rendered: highlight(slot.content, "html"),
}))
.sort((a, b) => a.name > b.name);
}
}
};
</script>
<style scoped src="../assets/listing.css"></style>