代客下单增加搜索

This commit is contained in:
2024-10-11 10:05:26 +08:00
parent bc03b2c30e
commit f44a0c0a50
2 changed files with 55 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view class="u-relative u-flex item">
<image lazy-load class="img" :src="data.coverImg" mode=""></image>
<image lazy-load class="img" :src="data.coverImg" mode="" :style="computedImgStyle()"></image>
<view class="info u-flex u-row-between u-col-top u-flex-col" @tap="emitEvent('add')">
<view>
<view>{{data.name}}</view>
@@ -50,6 +50,13 @@
watch
} from 'vue';
const props = defineProps({
img:{
type:Object,
default:{
width:'250rpx',
height:'272rpx'
}
},
index: {
type: Number,
},
@@ -67,6 +74,14 @@
}
}
})
function computedImgStyle(){
return {
width:props.img.width,
height:props.img.height
}
}
//判断是否是菜品
function isGoods(){
return props.data.hasOwnProperty('id')
@@ -118,8 +133,8 @@
}
.item {
width: 250rpx;
height: 272rpx;
// width: 250rpx;
// height: 272rpx;
background: #F9B798;
border-radius: 8rpx 8rpx 8rpx 8rpx;
overflow: hidden;