ykt-team-wxapp/components/empty-data.vue

25 lines
541 B
Vue
Raw Normal View History

2026-01-20 19:36:49 +08:00
<template>
<view>
<image class="mx-auto" :style="style" src="/static/empty.svg"></image>
<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`)
</script>