fix: 修复 VoiceController Map.of 兼容性 + ExploreController 参数不匹配
- VoiceController: Map.of() -> Collections.singletonMap() 兼容 Java 8 - ExploreController: 补齐 takeoutService.roll() 缺失的 taste/priceRange/allergies 参数 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
12
miniapp/components/ingredient-tag/ingredient-tag.js
Normal file
12
miniapp/components/ingredient-tag/ingredient-tag.js
Normal file
@@ -0,0 +1,12 @@
|
||||
Component({
|
||||
properties: {
|
||||
name: { type: String, value: '' },
|
||||
icon: { type: String, value: '' },
|
||||
selected: { type: Boolean, value: false }
|
||||
},
|
||||
methods: {
|
||||
onTap() {
|
||||
this.triggerEvent('toggle', { name: this.data.name, selected: !this.data.selected });
|
||||
}
|
||||
}
|
||||
});
|
||||
3
miniapp/components/ingredient-tag/ingredient-tag.json
Normal file
3
miniapp/components/ingredient-tag/ingredient-tag.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
4
miniapp/components/ingredient-tag/ingredient-tag.wxml
Normal file
4
miniapp/components/ingredient-tag/ingredient-tag.wxml
Normal file
@@ -0,0 +1,4 @@
|
||||
<view class="ingredient-tag {{selected ? 'selected' : ''}}" bind:tap="onTap">
|
||||
<text>{{icon}} {{name}}</text>
|
||||
<text class="check" wx:if="{{selected}}">✓</text>
|
||||
</view>
|
||||
27
miniapp/components/ingredient-tag/ingredient-tag.wxss
Normal file
27
miniapp/components/ingredient-tag/ingredient-tag.wxss
Normal file
@@ -0,0 +1,27 @@
|
||||
.ingredient-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 8rpx var(--space-md);
|
||||
border-radius: var(--radius-full);
|
||||
background: #F5F2EE;
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-text-secondary);
|
||||
margin: 6rpx;
|
||||
transition: all 0.2s var(--ease-out);
|
||||
}
|
||||
|
||||
.ingredient-tag:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.ingredient-tag.selected {
|
||||
background: var(--color-green-pale);
|
||||
color: var(--color-green);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.check {
|
||||
margin-left: 6rpx;
|
||||
font-size: var(--text-caption);
|
||||
font-weight: 700;
|
||||
}
|
||||
Reference in New Issue
Block a user