You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<template> <view class="pageBgImg"> <topNavbar title=""></topNavbar> <view class="pad"> <view class="h3">请选择您要学习的类型</view> <view class="radioBox"> <view class="radioItem" v-for="(item,index) in radioArr" :key="index" @click="changeNav(item)"> <view class="text">{{ item.text }}</view> <view class="icon"> <image src="@/static/images/index/radio_cli.png" mode="" v-if="currentId==item.id"></image> <image src="@/static/images/index/radio_nor.png" mode="" v-else></image> </view> </view> </view> <view class="btn">去练习</view> </view> </view> </template>
<script> export default { data() { return { radioArr: [ {text: '自学练习', id: 1}, {text: '记录理论学时', id: 2}, {text: '安全警示教育在线视频学习', id: 3}, ], currentId: 2, } }, methods: { changeNav(item) { this.currentId = item.id } } } </script>
<style lang="scss" scoped> .radioBox { width: 100%; } .h3 { font-size: 28rpx; color: #fff; padding: 20rpx 10rpx; } .radioItem { width: 100%; height: 120rpx; background: #FFFFFF; border-radius: 16rpx; margin-bottom: 20rpx; display: flex; justify-content: space-between; align-items: center; padding: 0 32rpx; .text { font-size: 28rpx; } .icon { width: 32rpx; height: 32rpx; } } .btn { width: 396rpx; height: 72rpx; background: #1989FA; border-radius: 8rpx; font-size: 28rpx; color: #fff; text-align: center; line-height: 72rpx; margin: 140rpx auto 0 auto; } </style>
|