ccy_DIB/components/noData.vue
ylj20011123 590499fb84 update
2025-08-18 19:09:14 +08:00

72 lines
1.4 KiB
Vue

<template>
<div class="no-data-tip">
<!-- <image :src="noDataPath" v-if="type === 1"></image> -->
<div v-if="type === 1" class="imgBox">
<image style="width: 72rpx; height: 72rpx" :src="newNoDataPath"></image>
</div>
<image :src="noCoupon" v-else class="imgBigBox"></image>
<div class="textBox" @click="refresh">{{ text }}</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
// 基础类型检测, null意味着任何类型都行
text: String,
isShow: Boolean,
type: {
type: Number,
default: 1,
},
},
data() {
return {
newNoDataPath: "/static/images/home/lostAndFoundIcon.svg",
noDataPath: "https://eshangtech.com/ShopICO/no-data.png",
noCoupon: "https://eshangtech.com/ShopICO/no-coupon.png",
};
},
computed: {
...mapGetters({
isLoading: "isLoading",
}),
},
methods: {
refresh() {
if (this.text.indexOf("点击") > -1) {
this.$emit("refresh");
}
},
},
};
</script>
<style lang="less" scoped>
.no-data-tip {
width: 100%;
.imgBox {
width: 100%;
display: flex;
justify-content: center;
}
.imgBigBox {
width: 200px;
height: 150px;
}
.textBox {
font-size: 28rpx;
font-weight: bolder;
color: #b8b7b4;
width: 100%;
text-align: center;
margin-top: 8rpx;
}
}
</style>