左侧导航栏修复正常
This commit is contained in:
22
app/components/content/ButtonLink.vue
Normal file
22
app/components/content/ButtonLink.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<NuxtLink :to="to || href" :target="(blank && '_blank') || target">
|
||||
<UButton :variant="variant" :size="size">
|
||||
<Icon v-if="leftIcon" :name="leftIcon" class="mr-1" />
|
||||
<ContentSlot unwrap="p" />
|
||||
<Icon v-if="rightIcon" :name="rightIcon" class="ml-1" />
|
||||
</UButton>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
variant?: 'solid' | 'outline' | 'ghost' | 'link' | 'soft';
|
||||
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||
leftIcon?: string;
|
||||
rightIcon?: string;
|
||||
to?: string;
|
||||
href?: string;
|
||||
target?: string;
|
||||
blank?: boolean;
|
||||
}>();
|
||||
</script>
|
Reference in New Issue
Block a user