罗世杰:faet:SearchShopList组件支持第二种样式
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
v-for="item in shopInfoList"
|
||||
:key="searchid"
|
||||
:shopInfo="item"
|
||||
:show-style="showStyle"
|
||||
@delItem="handleDel"
|
||||
></SearchShopListItem>
|
||||
</view>
|
||||
</template>
|
||||
@@ -20,6 +22,18 @@
|
||||
};
|
||||
},
|
||||
props: {
|
||||
showStyle:{
|
||||
type: Number,
|
||||
default() {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
},
|
||||
shopInfoList: {
|
||||
type: Array,
|
||||
default() {
|
||||
@@ -33,7 +47,8 @@
|
||||
pos: '锦江区',
|
||||
category: '餐饮美食',
|
||||
uname: 'A先生',
|
||||
sqr: 500
|
||||
sqr: 500,
|
||||
yjtzText: "423万元"
|
||||
},
|
||||
{
|
||||
searchid: 2,
|
||||
@@ -44,11 +59,21 @@
|
||||
pos: '锦江区',
|
||||
category: '餐饮美食',
|
||||
uname: '王先生',
|
||||
sqr: 200
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user