侧滑列表,适用于购物车列表等场景
npm install --save vue-sideslip
<button @click="slipHandle">展开/关闭</button> //开关控制
<vue-sideslip :slipControll="slipControll">
<div slot="left">定义左边盒子内容</div>
<div slot="right">定义右边盒子内容</div>
</vue-sideslip>
import vueSideslip from 'vue-sideslip'
export default {
data(){
return {
slipControll:true,
}
},
components: { vueSideslip },
methods:{
slipHandle(){
this.slipControll = !this.slipControll
}
}
}
For detailed explanation on how things work, checkout the guide and docs for vue-loader.