Blame view

components/thorui/tui-nomore/tui-nomore.vue 2.13 KB
46b6767c   刘淇   init 提交到库
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
  <template>
  	<view class="tui-nomore-class tui-loadmore-none">
  		<view :class="[isDot?'tui-nomore-dot':'tui-nomore']">
  			<view :style="{backgroundColor:backgroundColor}" :class="[isDot?'tui-dot-text':'tui-nomore-text']">{{isDot?dotText:text}}</view>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		name: "tuiNomore",
  		props: {
  			//当前页面背景颜色
  			backgroundColor: {
  				type: String,
  				default: "#fafafa"
  			},
  			//是否以圆点代替 "没有更多了"
  			isDot: {
  				type: Boolean,
  				default: false
  			},
  			//isDot为false时生效
  			text: {
  				type: String,
  				default: "没有更多了"
  			}
  		},
  		data() {
  			return {
  				dotText: "●"
  			};
  		}
  	}
  </script>
  
  <style scoped>
  	.tui-loadmore-none {
  		width: 50%;
  		margin: 1.5em auto;
  		line-height: 1.5em;
  		font-size: 24rpx;
  		display: flex;
  		justify-content: center;
  	}
  
  	.tui-nomore {
  		width: 100%;
  		height: 100%;
  		position: relative;
  		display: flex;
  		justify-content: center;
  		margin-top: 10rpx;
  		padding-bottom: 6rpx;
  	}
  
  	.tui-nomore::before {
  		content: ' ';
  		position: absolute;
  		border-bottom: 1rpx solid #e5e5e5;
  		-webkit-transform: scaleY(0.5);
  		transform: scaleY(0.5);
  		width: 100%;
  		top: 18rpx;
  		left: 0;
  	}
  
  	.tui-nomore-text {
  		color: #999;
  		font-size: 24rpx;
  		text-align: center;
  		padding: 0 18rpx;
  		height: 36rpx;
  		line-height: 36rpx;
  		position: relative;
  		z-index: 1;
  	}
  
  	.tui-nomore-dot {
  		position: relative;
  		text-align: center;
  		-webkit-display: flex;
  		display: flex;
  		-webkit-justify-content: center;
  		justify-content: center;
  		margin-top: 10rpx;
  		padding-bottom: 6rpx;
  	}
  
  	.tui-nomore-dot::before {
  		content: '';
  		position: absolute;
  		border-bottom: 1rpx solid #e5e5e5;
  		-webkit-transform: scaleY(0.5)  translateX(-50%);
  		transform: scaleY(0.5)  translateX(-50%);
  		width: 360rpx;
  		top: 18rpx;
  		left: 50%;
  	}
  
  	.tui-dot-text {
  		position: relative;
  		color: #e5e5e5;
  		font-size: 10px;
  		text-align: center;
  		width: 50rpx;
  		height: 36rpx;
  		line-height: 36rpx;
  		-webkit-transform: scale(0.8);
  		transform: scale(0.8);
  		-webkit-transform-origin: center center;
  		transform-origin: center center;
  		z-index: 1;
  	}
  </style>