[抖火申请支付]
This commit is contained in:
58
components/mould-checkbox.vue
Normal file
58
components/mould-checkbox.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<view>
|
||||
<checkbox-group @change="checkboxChange">
|
||||
<view class="idcardAdd-multi-write" v-for="(letterItem, letterIndex) in checkboxList" :key="letterIndex">
|
||||
<checkbox :value="letterIndex.toString()" :checked="isChecked(letterIndex)" color="#4e7bfe" style="transform:scale(.6); margin-top: -3rpx;"/>
|
||||
<text>{{letterItem}}</text>
|
||||
</view>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
name: 'mouldCheckbox',
|
||||
data(){
|
||||
return {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isChecked(){
|
||||
return (index) => {
|
||||
return this.checkboxVlaue.findIndex(val => val == index) >= 0
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
checkboxVlaue: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
checkboxList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkboxChange(e){
|
||||
this.$emit('onCheckbox', e.detail.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.idcardAdd-multi-write {
|
||||
line-height: 70rpx;
|
||||
margin-top: $margin;
|
||||
display: flex;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user