Files
city-store-transfer/components/SearchShopList/SearchShopList.vue

83 lines
1.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<SearchShopListItem
v-for="item in shopInfoList"
:key="searchid"
:shopInfo="item"
:show-style="showStyle"
@delItem="handleDel"
></SearchShopListItem>
</view>
</template>
<script>
/**
* @property {Array} shopInfoList 对象数组,(不带图片)需要展示的商铺列表
*/
export default {
name:"SearchShopList",
data() {
return {
};
},
props: {
showStyle:{
type: Number,
default() {
return 0
}
},
isEdit: {
type: Boolean,
default() {
return false
}
},
shopInfoList: {
type: Array,
default() {
return [
{
searchid: 1,
title: '寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右',
price: 5000,
date: '2023-11-02',
phoneNum: 13348946108,
pos: '锦江区',
category: '餐饮美食',
uname: 'A先生',
sqr: 500,
yjtzText: "423万元"
},
{
searchid: 2,
title: '寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右',
price: 7000,
date: '2023-11-02',
phoneNum: 13348946108,
pos: '锦江区',
category: '餐饮美食',
uname: '王先生',
sqr: 200,
yjtzText: "423万元"
}
]
}
}
},
methods: {
handleDel(shopid){
console.log("删除了商铺", shopid);
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
// TODO不能直接修改
// if(delindex !== -1) this.shopInfoList = this.shopInfoList.slice(delindex,1)
// console.log(this.shopInfoList);
}
}
}
</script>
<style lang="scss">
</style>