ykt-wxapp/components/empty-data.vue

30 lines
593 B
Vue
Raw Permalink Normal View History

2026-01-19 18:52:18 +08:00
<template>
<view>
2026-01-27 17:09:31 +08:00
<image class="block mx-auto" :style="style" src="/static/empty.svg"></image>
2026-01-19 18:52:18 +08:00
<view v-if="showText" class="mt-10 text-base text-center text-gray">{{ text }}</view>
</view>
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
showText: {
type: Boolean,
default: true
},
size: {
type: Number,
default: 200
},
text: {
type: String,
default: '暂无数据'
}
})
const style = computed(() => `width: ${props.size}rpx;height:${props.size}rpx`)
2026-01-27 17:09:31 +08:00
</script>
<style>
.block {
display: block;
}
</style>