import { defineComponent } from 'vue';
import styles from './index.module.less';
import { NEmpty, NImage } from 'naive-ui';
import emptyImg from './images/nomore.png'

export default defineComponent({
  name: 'the-empty',
  props: {
    description: {
      type: String,
      default: '暂无数据'
    }
  },
  setup(props) {
    return () => (
      <div class={styles.theEmtpy}>
        <NEmpty description={props.description} v-slots={{
          icon: () => <NImage class={styles.emptyImg} previewDisabled src={emptyImg}></NImage>
        }} />
      </div>
    );
  }
});
