This commit is contained in:
xingyu4j
2025-09-18 17:58:14 +08:00
12 changed files with 1359 additions and 1343 deletions

View File

@@ -11,6 +11,7 @@ export * from './loading';
export * from './page';
export * from './resize';
export * from './tippy';
export * from './tree';
export * from '@vben-core/form-ui';
export * from '@vben-core/popup-ui';
@@ -29,7 +30,6 @@ export {
VbenPinInput,
VbenSelect,
VbenSpinner,
VbenTree,
} from '@vben-core/shadcn-ui';
export type { FlattenedItem } from '@vben-core/shadcn-ui';

View File

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

View File

@@ -0,0 +1,25 @@
<script setup lang="ts">
import type { TreeProps } from '@vben-core/shadcn-ui';
import { Inbox } from '@vben/icons';
import { $t } from '@vben/locales';
import { treePropsDefaults, VbenTree } from '@vben-core/shadcn-ui';
const props = withDefaults(defineProps<TreeProps>(), treePropsDefaults());
</script>
<template>
<VbenTree v-if="props.treeData?.length > 0" v-bind="props">
<template v-for="(_, key) in $slots" :key="key" #[key]="slotProps">
<slot :name="key" v-bind="slotProps"> </slot>
</template>
</VbenTree>
<div
v-else
class="flex-col-center text-muted-foreground cursor-pointer rounded-lg border p-10 text-sm font-medium"
>
<Inbox class="size-10" />
<div class="mt-1">{{ $t('common.noData') }}</div>
</div>
</template>

View File

@@ -115,7 +115,12 @@ defineExpose({
{{ submitButtonText || $t('common.login') }}
</slot>
</VbenButton>
<VbenButton v-if="showBack" class="mt-4 w-full" variant="outline" @click="goToLogin()">
<VbenButton
v-if="showBack"
class="mt-4 w-full"
variant="outline"
@click="goToLogin()"
>
{{ $t('common.back') }}
</VbenButton>
</div>

View File

@@ -94,7 +94,12 @@ function goToLogin() {
</p>
</div>
<VbenButton v-if="showBack" class="mt-4 w-full" variant="outline" @click="goToLogin()">
<VbenButton
v-if="showBack"
class="mt-4 w-full"
variant="outline"
@click="goToLogin()"
>
{{ $t('common.back') }}
</VbenButton>
</div>