Skip to content

介绍


本文档主要用于描述 ShadcnEmpty 组件的一些特性和用法。

用法

查看代码
vue
<template>
    <ShadcnEmpty />
</template>

自定义 (slot)

查看代码
vue
<template>
  <ShadcnEmpty>
    <template #image>
      <ShadcnIcon icon="User" size="80"/>
    </template>

    <template #title>
      <h3 class="text-lg font-semibold">Custom Title</h3>
    </template>

    <template #description>
      <p>Custom Description</p>
    </template>

    <template #actions>
      <div class="flex gap-2">
        <ShadcnButton>Button 1</ShadcnButton>
        <ShadcnButton>Button 2</ShadcnButton>
      </div>
    </template>
  </ShadcnEmpty>
</template>

空数据 (Empty) 插槽