radioTemp.vue
3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<template>
<view class="wrap">
<view class="radioTemp" :class="{margBottom:item.last}" v-for="(item,index) in keyList" :key="index">
<view class="radioTop">
{{item.title}}
<image v-if="item.moreBtn" src="../static/image/icon_add.png" mode="" @click="showRecordMore"></image>
</view>
<view class="radioBottom" :class="{padBottom:item.more}">
<view class="radioItem" @click="radioCheck(index,subIndex)" :class="{active:subItem.check}" v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex">
{{subItem.title}}
</view>
</view>
<view class="recordMoreWrap" v-if="item.more">
<view class="address" v-if="lan != '' && lon != ''">
<image src="../static/image/icon_loc2.png" mode=""></image>
<view class="lang">
经度: {{lan}} 纬度: {{lon}}
<image class="clearBtn" src="../static/image/icon_clear2.png" mode="" @click="delAddress()"></image>
</view>
</view>
<view class="desc">
经过上述讨论, 要想清楚,关于我们,到底是一种怎么样的存在。 现在,解决关于我们的问题,是非常非常重要的。
</view>
<view class="imgList">
<view class="imgItem" v-for="(item,index) in imgList" :key="index">
<image class="img" src="../static/logo.png" mode=""></image>
<image class="clearBtn" src="../static/image/icon_clear2.png" mode="" @click="del(index)"></image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
lan:196.299099,
lon:12.49693,
imgList:[1,2]
}
},
props:{
keyList:{
type:Array
}
},
methods: {
delAddress(){
this.lan = ''
this.lon = ''
},
del(index){
this.imgList.splice(index,1)
},
radioCheck(index,subIndex){
for(var i = 0; i < this.keyList[index].subKeyList.length; i ++){
this.keyList[index].subKeyList[i].check = false
}
this.keyList[index].subKeyList[subIndex].check = true
},
showRecordMore(){
this.$emit('showRecordMore')
}
}
}
</script>
<style lang="scss">
.radioTemp{padding: 40rpx 32rpx;background: #fff;margin-top: 16rpx;}
.radioTemp.margBottom{margin-bottom: 32rpx;}
.radioTemp:nth-child(1){margin-top:0}
.radioTemp .radioTop{display: flex;justify-content: space-between;align-items: center;font-size: 30rpx;}
.radioTop image{width: 44rpx;height: 44rpx;}
.radioTemp .radioBottom{padding-top: 24rpx;display: flex;justify-content: space-between;}
.radioBottom.padBottom{border-bottom: 2rpx solid #f2f3f5;padding-bottom: 32rpx;}
.radioBottom .radioItem{width: 328rpx;height: 72rpx;border-radius: 86rpx;border: 1rpx solid #dcdee0;text-align: center;line-height: 72rpx;color: #646566;font-size: 28rpx;}
.radioItem.active{color: $theme-color;background: #e8fff2;border: 1rpx solid #4bb377;}
.address{display: flex;padding-top: 33rpx;}
.address image{width: 48rpx;height: 48rpx;}
.address .lang{padding: 0 16rpx;height: 48rpx;line-height: 48rpx;background: #f7f8fa;font-size: 24rpx;color: #646566;position: relative;}
.lang .clearBtn{width: 28rpx;height: 28rpx;position: absolute;right: -10rpx;top: -10rpx;}
.desc{font-size: 28rpx;padding: 48rpx 0 44rpx 0;}
.imgList{display: flex;flex-wrap: wrap;}
.imgList .imgItem{position: relative;width: 160rpx;height: 160rpx;margin: 10rpx 10rpx 0 0;}
.imgItem .img{width: 160rpx;height: 160rpx;}
.imgItem .clearBtn{width: 28rpx;height: 28rpx;position: absolute;right: -10rpx;top: -10rpx;}
</style>