<template>
	<view class="">
		<uni-swipe-action ref="swipeAction">
			<uni-swipe-action-item  :right-options="options" @click="swipeClick($event,index)">
				<view class="">
				实际:{{dataContent.code}}
				</view>
				<view class="">
				实际:{{dataContent.patch}}
				</view>
				<view class="">
				实际:{{dataContent.locatioCode}}
				</view>
			</uni-swipe-action-item>
		</uni-swipe-action>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				options: [{
						text: '置顶'
					},
					{
						text: '标记为已读',
						style: {
							backgroundColor: 'rgb(254,156,1)'
						}
					},
					{
						text: '删除',
						style: {
							backgroundColor: 'rgb(255,58,49)'
						}
					}
				]
			}

		},
		props: {
			dataContent: {
				type: Object,
				default: {}
			},
			index:{
				type:Number,
				default:0
			}
		},
		methods:{
			swipeClick(e,index) {
				console.log("点击",e.content.text)
				 {
					uni.showToast({
						title: `点击了${e.content.text}按钮`+index,
						icon: 'none'
					});
				}
			}
			
		}
	}
</script>

<style>
</style>