mall-applet1/pagesA/shopping-cart-slide/shopping-cart-slide.vue

76 lines
1.4 KiB
Vue

<template>
<view>
<status-container titlet="购物车">
<view slot="content">
<cart-slide :list="list" :button="buttonList" :border="true" @click="clickMethod" @change="changeMethod"></cart-slide>
</view>
</status-container>
</view>
</template>
<script>
import cartSlide from '@/components/shopping-carts/cart-slide';
export default {
components:{
cartSlide
},
data() {
return {
list : [
{
id: 1,
image: 'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title: '张三',
rightDetail: '2019-03-18',
detail: 'XXXXXXXXXXXXXXXXXXX公司',
slide_x: 0
},
{
id: 2,
surname: '李',
title: '李二',
rightDetail: '2019-03-17',
detail: 'XXXXXXXXXXXXXXXXXXX公司',
slide_x: 0
},
{
id: 3,
title: '王五',
rightDetail: '2019-03-18',
slide_x: 0
},
{
id: 4,
surname: '李',
detail: 'XXXXXXXXXXXXXXXXXXX公司',
slide_x: 0
}
],
buttonList: [
{
title: '分享',
background: '#c4c7cd'
},
{
title: '删除',
background: '#ff3b32'
}
]
}
},
methods: {
changeMethod(data, button, index){
console.log('滑动按钮回调', data)
console.log('滑动按钮回调', button)
},
clickMethod(data){
console.log('点击行回调', data)
}
}
}
</script>
<style>
</style>