feat: add about page

This commit is contained in:
vben
2024-06-23 20:05:22 +08:00
parent d4f61c283f
commit 199d5506ac
28 changed files with 394 additions and 18 deletions

View File

@@ -13,10 +13,12 @@ export * from './hover-card';
export * from './icon';
export * from './input';
export * from './input-password';
export * from './link';
export * from './logo';
export * from './menu-badge';
export * from './pin-input';
export * from './popover';
export * from './render-content';
export * from './scrollbar';
export * from './segmented';
export * from './sheet';
@@ -27,6 +29,7 @@ export * from './ui/avatar';
export * from './ui/badge';
export * from './ui/breadcrumb';
export * from './ui/button';
export * from './ui/card';
export * from './ui/checkbox';
export * from './ui/dialog';
export * from './ui/dropdown-menu';

View File

@@ -0,0 +1 @@
export { default as VbenLink } from './link.vue';

View File

@@ -0,0 +1,30 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue';
import { cn } from '@vben-core/toolkit';
import { Primitive, type PrimitiveProps } from 'radix-vue';
interface Props extends PrimitiveProps {
class?: HTMLAttributes['class'];
href: string;
}
const props = withDefaults(defineProps<Props>(), {
as: 'a',
class: '',
href: '',
});
</script>
<template>
<Primitive
:as="as"
:as-child="asChild"
:class="cn('text-primary hover:text-primary-hover', props.class)"
:href="href"
target="_blank"
>
<slot></slot>
</Primitive>
</template>

View File

@@ -0,0 +1 @@
export { default as VbenRenderContent } from './render-content.vue';

View File

@@ -0,0 +1,23 @@
<script setup lang="ts">
import type { Component } from 'vue';
defineOptions({
name: 'RenderContent',
});
const props = withDefaults(
defineProps<{ content: Component | string; props?: Record<string, any> }>(),
{
props: () => ({}),
},
);
const isComponent = typeof props.content === 'object' && props.content !== null;
</script>
<template>
<component :is="content" v-bind="props" v-if="isComponent" />
<template v-else-if="!isComponent">
{{ content }}
</template>
</template>

View File

@@ -61,7 +61,7 @@ function onTransitionEnd() {
:class="{
'invisible opacity-0': !showSpinner,
}"
class="flex-center bg-overlay absolute left-0 top-0 size-full backdrop-blur-sm transition-all duration-500"
class="flex-center bg-overlay z-100 absolute left-0 top-0 size-full backdrop-blur-sm transition-all duration-500"
@transitionend="onTransitionEnd"
>
<div

View File

@@ -11,7 +11,10 @@ const props = defineProps<{
<template>
<div
:class="
cn('bg-card text-card-foreground rounded-xl border shadow', props.class)
cn(
'bg-card text-card-foreground border-border rounded-xl border shadow',
props.class,
)
"
>
<slot></slot>

View File

@@ -9,7 +9,7 @@ const props = defineProps<{
</script>
<template>
<div :class="cn('flex flex-col gap-y-1.5 p-6', props.class)">
<div :class="cn('flex flex-col gap-y-1.5 p-5', props.class)">
<slot></slot>
</div>
</template>