Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
feat(vbenComponents): add Spin(Loading) (#282)
Browse files Browse the repository at this point in the history
Co-authored-by: jackhoo_98 <[email protected]>
  • Loading branch information
13982720426 and jackhoo_98 authored Nov 25, 2023
1 parent b6818f4 commit b376026
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/admin/init-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ import naive, {
NPageHeader,
NCollapse,
NCollapseItem,
NSpin,
} from 'naive-ui'
import { initVbenComponent, setNotice, setMessage } from '@vben/vbencomponents'

Expand Down Expand Up @@ -190,6 +191,7 @@ export async function registerComponents(app) {
Result: NResult,

Space: NSpace,
Spin: NSpin,
Select: NSelect,
Switch: NSwitch,
Slider: NSlider,
Expand Down
Empty file.
13 changes: 13 additions & 0 deletions packages/vbenComponents/src/spin/src/Spin.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script lang="ts" setup name="VbenSpin">
import { maps } from '#/index'
const Spin = maps.get('Spin')
</script>
<template>
<Spin v-bind="$attrs">
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
<slot :name="item" v-bind="data || {}"></slot> </template
></Spin>
</template>

<style scoped></style>

0 comments on commit b376026

Please sign in to comment.