Skip to content

Commit

Permalink
feat: add back button
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <zhangtianli2006@163.com>
  • Loading branch information
ZTL-UwU committed Jul 23, 2024
1 parent 6f71dab commit f78c482
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions components/PageTitle.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<template>
<div class="mb-6 flex">
<div class="space-y-1">
<div class="mb-6 flex flex-col sm:flex-row items-center gap-4">
<div class="space-y-1 text-center sm:text-start">
<p class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
{{ title }}
</p>
<p class="text-lg text-muted-foreground">
{{ description }}
</p>
</div>
<NuxtLink v-if="newButton" class="ml-auto" to="/new">
<Button>我要添加内容</Button>
</NuxtLink>

<div class="sm:ml-auto flex gap-2">
<NuxtLink to="/">
<Button variant="outline">
<Icon name="lucide:arrow-left" class="mr-1" />
返回
</Button>
</NuxtLink>
<NuxtLink v-if="newButton" to="/new">
<Button>我要添加内容</Button>
</NuxtLink>
</div>
</div>
</template>

Expand Down

0 comments on commit f78c482

Please sign in to comment.