<uni-swipe-action>
<uni-swipe-action-item
:right-options="options"
@click="bindClick"
:show="isOpened"
:auto-close="false"
@change="change"
>
<view>测试内容</view>
</uni-swipe-action-item>
</uni-swipe-action>
data(){
return {
isOpened: "none",
// 右滑删除配置
options: [
{
text: "删除",
style: {
backgroundColor: "#ff3242",
},
},
],
}
},
methods: {
bindClick(e) {
uni.showToast({
title: `点击了${e.position === 'left' ? '左侧' : '右侧'} ${e.content.text}按钮`,
icon: 'none'
});
},
change(e){
console.log(e, '改变事件')
}
}