Skip to content
On this page

基本使用

通过 label修改提示词

html
<uvEmpty label="无数据" />

自定义大小

通过 image-size 调整大小

html
<uvEmpty image-size="80" label="无数据" />

自定义图片

当传入image时会使用image的图片地址

html
<uvEmpty image-size="80" image="https://fastly.jsdelivr.net/npm/@vant/assets/custom-empty-image.png" label="无数据" />

图片插槽

通过 image 插槽修改

html
<uvEmpty label="无数据">
  <template #image>
    iamge
  </template>
</uvEmpty>

自定义底部内容

通过默认插槽修改底部内容

html
<uvEmpty>
  我是自定义内容
  <div style="margin-top: 10px;">
    <uv-button>按钮</uv-button>
  </div>
</uvEmpty>

props

属性含义类型默认值
image图片地址String'default'
imageSize图片尺寸[String, Number]160
label底部文字String-

events

事件名称含义参数
click点击事件-

css变量

css
--uv-empty-label-margin-top: 16px;
  --uv-empty-label-font-size: 14px;
  --uv-empty-label-color: #969799;

Released under the MIT License.