mirror of
https://github.com/fmhy/edit.git
synced 2026-02-18 09:11:33 +11:00
comment
This commit is contained in:
parent
48ecbf8a8a
commit
e6a599f579
1 changed files with 7 additions and 0 deletions
|
|
@ -1,15 +1,22 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
// Import the 'useData' function from 'vitepress'
|
||||||
import { useData } from 'vitepress'
|
import { useData } from 'vitepress'
|
||||||
|
|
||||||
|
// Use destructuring to extract 'frontmatter' from the data returned by 'useData'
|
||||||
const { frontmatter } = useData()
|
const { frontmatter } = useData()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<!-- Check if 'frontmatter.hero.prelink' exists -->
|
||||||
<a
|
<a
|
||||||
v-if="frontmatter.hero.prelink"
|
v-if="frontmatter.hero.prelink"
|
||||||
|
<!-- Assign the value of 'frontmatter.hero.prelink.link' to the 'href' attribute -->
|
||||||
:href="frontmatter.hero.prelink.link"
|
:href="frontmatter.hero.prelink.link"
|
||||||
|
<!-- Apply the 'inline-flex' and 'items-center' classes to the element -->
|
||||||
class="inline-flex items-center rounded-lg bg-[var(--vp-c-default-soft)] px-4 py-1 text-sm font-semibold mb-3"
|
class="inline-flex items-center rounded-lg bg-[var(--vp-c-default-soft)] px-4 py-1 text-sm font-semibold mb-3"
|
||||||
>
|
>
|
||||||
|
<!-- Display the value of 'frontmatter.hero.prelink.title' -->
|
||||||
{{ frontmatter.hero.prelink.title }}
|
{{ frontmatter.hero.prelink.title }}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue