index.tsx 581 B

1234567891011121314151617181920212223
  1. import { defineComponent } from 'vue';
  2. import styles from './index.module.less';
  3. import { NEmpty, NImage } from 'naive-ui';
  4. import emptyImg from './images/nomore.png'
  5. export default defineComponent({
  6. name: 'the-empty',
  7. props: {
  8. description: {
  9. type: String,
  10. default: '暂无数据'
  11. }
  12. },
  13. setup(props) {
  14. return () => (
  15. <div class={styles.theEmtpy}>
  16. <NEmpty description={props.description} v-slots={{
  17. icon: () => <NImage class={styles.emptyImg} previewDisabled src={emptyImg}></NImage>
  18. }} />
  19. </div>
  20. );
  21. }
  22. });