罗世杰:feat:商铺展示列表提供删除和编辑按钮
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
:shopInfo="item"
|
||||
:is-adshow="isADshow"
|
||||
:show-style="showStyle"
|
||||
@delItem="handleDel"
|
||||
></ShowShopListItem>
|
||||
</view>
|
||||
</template>
|
||||
@@ -15,6 +16,7 @@
|
||||
* @property {Array} shopInfoList 对象数组,(带图片)需要展示的商铺列表
|
||||
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
|
||||
* @property {Boolean} isADshow 是否显示推广广告
|
||||
* @property {Boolean} isEdit 是否显示编辑和删除
|
||||
*/
|
||||
export default {
|
||||
name:"ShowShopList",
|
||||
@@ -27,7 +29,7 @@
|
||||
showStyle:{
|
||||
type: Number,
|
||||
default() {
|
||||
return 0
|
||||
return 1
|
||||
}
|
||||
},
|
||||
isADshow: {
|
||||
@@ -76,6 +78,15 @@
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
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