first commit

This commit is contained in:
2026-09-11 01:45:04 +08:00
commit 0a8d60d87f
145 changed files with 40978 additions and 0 deletions
@@ -0,0 +1,4 @@
{
"component": true,
"styleIsolation": "apply-shared"
}
@@ -0,0 +1,14 @@
Component({
properties: {
item: { type: Object, value: {} },
selectable: { type: Boolean, value: false },
selected: { type: Boolean, value: false },
statusText: { type: String, value: '' },
statusType: { type: String, value: 'gray' },
},
methods: {
onTap() {
this.triggerEvent('select', { item: this.data.item })
},
},
})
@@ -0,0 +1,20 @@
<view class="clothes-card {{selected ? 'selected' : ''}}" bindtap="onTap">
<view class="clothes-img">
<image
wx:if="{{item.processed_image}}"
class="clothes-img-img"
src="{{item.processed_image}}"
mode="aspectFill"
lazy-load
/>
<view wx:else class="clothes-placeholder">
<view class="icon icon-hanger"></view>
</view>
<view wx:if="{{statusText}}" class="clothes-status tag tag-{{statusType}}">{{statusText}}</view>
</view>
<view class="clothes-name">{{item.name || '未命名衣物'}}</view>
<view class="clothes-sub">{{item.category_main}}{{item.category_sub ? ' · ' + item.category_sub : ''}}{{item.color_main ? ' · ' + item.color_main : ''}}</view>
<view wx:if="{{selectable}}" class="clothes-check {{selected ? 'on' : ''}}">
<view wx:if="{{selected}}" class="icon icon-check"></view>
</view>
</view>
@@ -0,0 +1,91 @@
.clothes-card {
position: relative;
background: #fff;
border-radius: 32rpx;
padding: 20rpx;
box-sizing: border-box;
border: 2rpx solid transparent;
}
.clothes-card.selected {
border-color: #007AFF;
}
.clothes-img {
position: relative;
width: 100%;
aspect-ratio: 1;
background: #F2F2F7;
border-radius: 24rpx;
overflow: hidden;
margin-bottom: 16rpx;
}
.clothes-img-img {
width: 100%;
height: 100%;
}
.clothes-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #C7C7CC;
}
.clothes-placeholder .icon {
width: 72rpx;
height: 72rpx;
}
.clothes-status {
position: absolute;
top: 12rpx;
right: 12rpx;
}
.clothes-name {
font-size: 26rpx;
font-weight: 500;
color: #1C1C1E;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.clothes-sub {
font-size: 22rpx;
color: #8E8E93;
margin-top: 4rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.clothes-check {
position: absolute;
top: 32rpx;
right: 32rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #C7C7CC;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.clothes-check.on {
background: #007AFF;
border-color: #007AFF;
color: #fff;
}
.clothes-check .icon {
width: 28rpx;
height: 28rpx;
}