42 lines
726 B
Vue
42 lines
726 B
Vue
<template>
|
|
<view class="empty flex-1 flex-center">
|
|
<image
|
|
v-if="type === 'normal'"
|
|
:src="`/static/images/${image}.png`"
|
|
mode="aspectFit"
|
|
:style="{ width: size + 'rpx', height: size + 'rpx' }"
|
|
/>
|
|
<text class="fs-28 text-secondary">
|
|
{{ text }}
|
|
</text>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'GNoData',
|
|
props: {
|
|
text: {
|
|
type: String,
|
|
default: '抱歉,暂无数据~'
|
|
},
|
|
size: {
|
|
type: Number,
|
|
default: 352
|
|
},
|
|
type: {
|
|
type: String,
|
|
default: 'normal'
|
|
},
|
|
image: {
|
|
type: String,
|
|
default: 'no-data'
|
|
}
|
|
},
|
|
data() {
|
|
return {};
|
|
}
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped></style>
|