Skip to content
目录

空页面

默认展示

vue
<template>
  <jp-empty></jp-empty>
</template>

slot 的使用

vue
<template>
  <jp-empty :img="attribute.emptyImg" :title="attribute.title" :subtitle="attribute.subtitle" margin-top="0px" @titleClick="titleClick">
    <template #action>
      <jp-button type="primary" style="margin-top: 8px" size="medium">操作按钮</jp-button>
    </template>
  </jp-empty>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'
const attribute = reactive({
  title: '',
  subtitle: '没有搜索到门店哦~',
  showSlot: false,
  emptyImg: '/static/example/img_store.png'
})

const titleClick = () => {
  console.log('titleClick')
}
</script>

props

属性名类型默认值
imgString'组件默认'
titleString'暂无数据'
subtitleString
marginTopString100px
点击事件
title-click

©2022 By 绝配移动端组件库