Sha256: 79d031d2ce18928ff41b323d405c367b211e882ade5b81fd724a601ca9fba9e2
Contents?: true
Size: 856 Bytes
Versions: 18
Compression:
Stored size: 856 Bytes
Contents
<template> <div class="tags are-medium"> <LinkComponent :data="data" :link="link" v-for="link in selectedLinks" :key="link.name" /> </div> </template> <script lang="ts"> import { computed, defineComponent } from "vue" import LinkComponent from "@/components/link/Link.vue" import { Links } from "@/links" import type { Link } from "@/types" export default defineComponent({ name: "LinksItem", components: { LinkComponent }, props: { data: { type: String, required: true }, type: { type: String, required: true } }, setup(props) { const links = Links const selectedLinks = computed((): Link[] => { if (props.type === undefined) { return links } return links.filter((link) => link.type === props.type) }) return { selectedLinks } } }) </script>
Version data entries
18 entries across 18 versions & 1 rubygems