106 lines
1.6 KiB
Vue
106 lines
1.6 KiB
Vue
<template>
|
||
<view class="protocol_box" @click="protocolClick()">
|
||
<view class="select" :class="{active: agree}" @click="agreeClick"></view>
|
||
由于本类活动特殊性,请自已查看
|
||
|
||
<view v-for="(item, index) in protocolArr" :key="index">
|
||
|
||
<!-- <text @click="protocolClick(index)">{{protocolArr[index]}}</text> -->
|
||
<text>免责声明</text>
|
||
|
||
<span v-if="index < (protocolArr.length - 1)">{{" 、"}}</span>
|
||
|
||
</view>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
props: {
|
||
// 是否同意
|
||
agree: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 协议数组
|
||
protocolArr: {
|
||
type: Array,
|
||
default: function() {
|
||
return [];
|
||
}
|
||
},
|
||
|
||
},
|
||
|
||
methods: {
|
||
// 是否同意勾选
|
||
agreeClick() {
|
||
|
||
this.$emit('click')
|
||
|
||
},
|
||
protocolClick(tag) {
|
||
|
||
this.$emit('protocolClick', tag)
|
||
|
||
}
|
||
|
||
}
|
||
|
||
|
||
}
|
||
</script>
|
||
|
||
|
||
|
||
|
||
<style lang="scss" scoped>
|
||
//主题色 #008CFF
|
||
$themeColor: #0CA013;
|
||
|
||
|
||
|
||
.protocol_box {
|
||
display: flex;
|
||
flex-wrap:nowrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
|
||
margin-top: 20rpx;
|
||
// margin-left: 40rpx;
|
||
width: 90%;
|
||
font-size: 28rpx;
|
||
color: $themeColor;
|
||
font-size: 13px;
|
||
.select {
|
||
width: 36rpx;
|
||
height: 36rpx;
|
||
background-image: url("./ic_nor.png");
|
||
background-position: center center;
|
||
background-repeat: no-repeat;
|
||
background-size: 100% auto;
|
||
margin-right: 15rpx;
|
||
margin-top: 2px;
|
||
|
||
|
||
&.active {
|
||
background-image: url("./ic_sel.png");
|
||
}
|
||
}
|
||
|
||
text {
|
||
|
||
|
||
color: $themeColor;
|
||
font-size: 13px;
|
||
text-decoration: underline;
|
||
white-space: pre-wrap;
|
||
|
||
|
||
|
||
}
|
||
|
||
|
||
}
|
||
</style> |