代客下单增加搜索
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user