<template> <div class="empty flex flex-v flex-align-center flex-justcontent-center"> <img :src="emptySrc" class="emptySrc" :style="{ width: width + 'px', height: height + 'px' }" /> <div class="empty-text">{{ emptyText }}</div> </div> </template> <script setup> import emptySrc from "@/assets/images/empty.png"; const props = defineProps({ //空数据文本 emptyText: { type: String, default: "暂无数据...", }, width: { type: Number, default: 220, }, height: { type: Number, default: 220, }, }); </script> <style scoped lang="scss"> .empty { width: 100%; .emptySrc { } .empty-text { font-size: 17px; font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-weight: 400; color: #6a8dda; line-height: 29px; position: absolute; margin-bottom: 20px; } } </style>