feat: loading and spinner component with directive (#5587)
* 添加loading和spinner组件,以及对应的vue指令
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<script lang="ts" setup>
|
||||
import { VbenLoading } from '@vben-core/shadcn-ui';
|
||||
|
||||
defineOptions({ name: 'Loading' });
|
||||
defineProps<{
|
||||
spinning: boolean;
|
||||
text?: string;
|
||||
}>();
|
||||
</script>
|
||||
<template>
|
||||
<div class="relative min-h-20">
|
||||
<slot></slot>
|
||||
<VbenLoading :spinning="spinning" :text="text">
|
||||
<template v-if="$slots.icon" #icon>
|
||||
<slot name="icon"></slot>
|
||||
</template>
|
||||
</VbenLoading>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user