This commit is contained in:
ChuXun
2025-10-19 20:28:31 +08:00
parent c81f8a8b03
commit eaab9a762a
100 changed files with 23416 additions and 0 deletions

31
components/empty/empty.js Normal file
View File

@@ -0,0 +1,31 @@
// components/empty/empty.js
Component({
properties: {
show: {
type: Boolean,
value: false
},
icon: {
type: String,
value: '📭'
},
text: {
type: String,
value: '暂无数据'
},
desc: {
type: String,
value: ''
},
buttonText: {
type: String,
value: ''
}
},
methods: {
onButtonClick() {
this.triggerEvent('buttonclick')
}
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,11 @@
<!--components/empty/empty.wxml-->
<view class="empty-container" wx:if="{{show}}">
<view class="empty-image">
<text class="empty-icon">{{icon}}</text>
</view>
<view class="empty-text">{{text}}</view>
<view class="empty-desc" wx:if="{{desc}}">{{desc}}</view>
<button class="empty-button" wx:if="{{buttonText}}" bindtap="onButtonClick">
{{buttonText}}
</button>
</view>

View File

@@ -0,0 +1,42 @@
/* components/empty/empty.wxss */
.empty-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 60rpx;
min-height: 400rpx;
}
.empty-image {
margin-bottom: 30rpx;
}
.empty-icon {
font-size: 120rpx;
opacity: 0.3;
}
.empty-text {
font-size: 32rpx;
color: #666666;
margin-bottom: 15rpx;
font-weight: 500;
}
.empty-desc {
font-size: 26rpx;
color: #999999;
text-align: center;
line-height: 1.6;
margin-bottom: 30rpx;
}
.empty-button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #ffffff;
border: none;
padding: 20rpx 60rpx;
border-radius: 50rpx;
font-size: 28rpx;
}