shopro-empty.vue
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<template>
<view class="y-f" :class="{ 'shopro-empty': isFixed }">
<image class="empty-img" :src="emptyData.img" mode="aspectFill"></image>
<view class="empty-text">{{ emptyData.tip }}</view>
<view class="btn-box" v-if="emptyData.path">
<button class="cu-btn empty-btn" @tap="tools.routerTo(emptyData.path)">{{ emptyData.pathText }}</button>
</view>
</view>
</template>
<script>
export default {
name: 'shoproEmpty',
components: {},
data() {
return {
tools: this.$tools
};
},
props: {
emptyData: {
// img:空白页图片
// tip:空白页提示语
// path:空白页跳转路径
// pathText:跳转按钮文本。
},
isFixed: {
//是否开启绝对定位。
type: Boolean,
default: true
}
},
computed: {},
methods: {}
};
</script>
<style lang="scss">
.shopro-empty {
position: fixed;
z-index: 11;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.empty-img {
width: 540rpx;
height: 290rpx;
}
.empty-text {
font-size: 26rpx;
color: #999;
}
.btn-box {
margin-top: 100rpx;
.empty-btn {
width: 320rpx;
height: 70rpx;
background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
border-radius: 35rpx;
font-size: 28rpx;
color: rgba(#fff, 0.9);
}
}
</style>