Mỗi ví dụ là một file Vue hoàn chỉnh. Chép vào app đã cài registry, hoặc mở trong StackBlitz.
Lần dùng đầu
Chưa có gì được thêm. Nói rõ chỗ này chứa gì và đưa ra một thao tác để bắt đầu. Viền nét đứt hiện vì đã đặt độ dày viền.
Chưa có kết nối nào
Kết nối cửa hàng online hoặc ERP để bắt đầu đồng bộ đơn hàng.
EmptyFirstUse.vue
<script setup lang="ts">
import { Plug } from '@lucide/vue'
import { Button } from '@/components/ui/button'
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from '@/components/ui/empty'
</script>
<template>
<Empty class="border-(length:--bh-border-width-default)">
<EmptyHeader>
<EmptyMedia><Plug aria-hidden="true" /></EmptyMedia>
<EmptyTitle><h3 class="m-0 [font:inherit]">Chưa có kết nối nào</h3></EmptyTitle>
<EmptyDescription>Kết nối cửa hàng online hoặc ERP để bắt đầu đồng bộ đơn hàng.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button>Thêm kết nối</Button>
</EmptyContent>
</Empty>
</template>Không có kết quả
Tìm kiếm hoặc bộ lọc không ra gì. Nói rõ đã tìm gì và cách mở rộng.
Không có khách hàng nào khớp "Lotus"
Kiểm tra lại chính tả, hoặc tìm theo số điện thoại hay email. Cách tìm kiếm hoạt động
EmptySearch.vue
<script setup lang="ts">
import { SearchX } from '@lucide/vue'
import { Button } from '@/components/ui/button'
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from '@/components/ui/empty'
</script>
<template>
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon"><SearchX aria-hidden="true" /></EmptyMedia>
<EmptyTitle>Không có khách hàng nào khớp "Lotus"</EmptyTitle>
<EmptyDescription>Kiểm tra lại chính tả, hoặc tìm theo số điện thoại hay email. <a href="#search-help">Cách tìm kiếm hoạt động</a></EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button variant="outline">Xóa tìm kiếm</Button>
</EmptyContent>
</Empty>
</template>