<template>
	<view>
		<view
		class="selList"
		v-for="(item, index) in list" :key="index" 
		>
			<view class="radios" @click="chooseItem(item)">
				<radio :checked="item.id == value" :value="item.name" />
				<text>{{item.name}}</text>
			</view>
			<view class="details" @click="viewDetail(item)">
				详情 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{
						id: '1232',
						name: '爱的街坊邻居爱上了对方加拉附件爱的街坊邻居爱上了对方加拉附件',
					},
					{
						id: '2223',
						name: 'banner',
					},
					{
						id: '3333',
						name: 'orange',
					}
				],
				value: '',
			}
		},
		methods: {
			// 选中方案
			chooseItem(item) {
				this.value = item.id
			},
			// 查看详情
			viewDetail(item){
				uni.navigateTo({
					url:"/pages/evaluatePlan/planDetail?id="+item.id
				})
			}
		}
	}
</script>

<style lang="scss">
	.selList{
		width: 100%;
		border-bottom: 1px solid #eee;
		display: flex;
		align-items: center;
		.radios{
			display: flex;
			align-items: center;
			flex-grow: 1;
			width: 50%;
			padding: 26upx 20upx;
			&:active{
				background-color: #F8F8F8;
			}
			text{
				word-break: break-all;
			}
		}
		.details{
			color: #007AFF;
			padding-right: 20upx;
			&:active{
				color: #D9363E;
			}
		}
	}
</style>
