kitchendDevice/unpackage/dist/dev/mp-weixin/pages/search/search.wxml

1 line
2.9 KiB
Plaintext
Raw Normal View History

2025-07-28 16:57:16 +08:00
<view class="{{['content','data-v-4cedc0c6',(show_food_search)?'noscroll':'']}}"><input class="search data-v-4cedc0c6" type="text" placeholder="{{placeholder}}" data-event-opts="{{[['focus',[['e0',['$event']]]],['blur',[['e1',['$event']]]],['input',[['__set_model',['','search_value','$event',[]]]]]]}}" value="{{search_value}}" bindfocus="__e" bindblur="__e" bindinput="__e"/><view class="picked-container data-v-4cedc0c6"><block wx:if="{{$root.g0<=0}}"><view class="empty data-v-4cedc0c6"><view class="data-v-4cedc0c6">看起来你还没添加任何食材!</view><view class="data-v-4cedc0c6">你可以通过上方的<label style="color:red;" class="_span data-v-4cedc0c6">输入框</label>自定义输入食材或者通过下方的<label style="color:red;" class="_span data-v-4cedc0c6">流行食材</label>点击添加</view></view></block><block wx:else><view class="data-v-4cedc0c6"><view class="top data-v-4cedc0c6"><view class="title data-v-4cedc0c6">已选食材</view><view data-event-opts="{{[['tap',[['e2',['$event']]]]]}}" bindtap="__e" class="data-v-4cedc0c6">清空</view></view><view class="picked-food data-v-4cedc0c6"><block wx:for="{{picked_food}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="picked-food-item data-v-4cedc0c6"><view class="inner data-v-4cedc0c6">{{item.name}}</view><view data-event-opts="{{[['tap',[['removePicked',['$0'],[[['picked_food','',index,'id']]]]]]]}}" class="close data-v-4cedc0c6" bindtap="__e">x</view></view></block></view><view class="tips data-v-4cedc0c6">* 点击移除食材</view><view data-event-opts="{{[['tap',[['onSearchFood',['$event']]]]]}}" class="food-match data-v-4cedc0c6" bindtap="__e">匹配菜谱</view></view></block></view><view class="popular-container data-v-4cedc0c6"><view class="title data-v-4cedc0c6">{{popular_food.title}}</view><block wx:for="{{popular_food.list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="popular-food-item data-v-4cedc0c6"><view class="food-title data-v-4cedc0c6">{{item.title}}</view><view class="popular-food-inner data-v-4cedc0c6"><block wx:for="{{item.list}}" wx:for-item="sub_item" wx:for-index="sub_index" wx:key="sub_index"><view data-event-opts="{{[['tap',[['addIngredients',['$0','$1'],[[['popular_food.list','',index],['list','',sub_index]],[['popular_food.list','',index,'list']]]]]]]}}" class="popular-food-subitem data-v-4cedc0c6" bindtap="__e">{{sub_item.name+''}}</view></block></view></view></block></view><block wx:if="{{show_food_search}}"><view class="food-search-wrap data-v-4cedc0c6"><block wx:for="{{food_search_list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="food-search-item data-v-4cedc0c6"><view class="data-v-4cedc0c6">{{item.name}}</view><view data-event-opts="{{[['tap',[['addIngredients',['$0'],[[['food_search_list','',index]]]]]]]}}" bindtap="__e" class="data-v-4cedc0c6">+</view></view></block></view></block></view>