2023-12-10 19:04:55 +00:00
|
|
|
<template>
|
|
|
|
|
|
|
|
|
|
<view class="">
|
|
|
|
|
<view class="">
|
|
|
|
|
<tpx-checkitems :list="list" :value="value" v-slot="dlCurrent" :min-checked="minChecked" :type="type"
|
|
|
|
|
@onChange="handleDataItemChange"
|
|
|
|
|
>
|
|
|
|
|
<view slot :class="`slt-item ${dlCurrent.checked?'active':''}`">
|
|
|
|
|
<u-row justify="between">
|
|
|
|
|
<view>
|
|
|
|
|
{{ dlCurrent.item.title }}
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="dlCurrent.checked">
|
|
|
|
|
<u-icon name="checkbox-mark" size="32" :bold="true"
|
|
|
|
|
:custom-style="`${dlCurrent.checked?'color:#B12D29;':''}`"
|
|
|
|
|
></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
</tpx-checkitems>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
// computed: {
|
|
|
|
|
// filDataList() {
|
|
|
|
|
// return []
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
props: {
|
|
|
|
|
minChecked: {
|
|
|
|
|
default () {
|
|
|
|
|
return 1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
type: {
|
|
|
|
|
default () {
|
|
|
|
|
return "single"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
show: {
|
|
|
|
|
default () {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
value: {
|
|
|
|
|
default () {
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
list: {
|
|
|
|
|
default () {
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
},
|
|
|
|
|
onHide() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
destroyed() {},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
handleDataItemChange(val) {
|
|
|
|
|
this.$emit('onChange', val)
|
|
|
|
|
this.$emit('update:value', val)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.slt-item{
|
2024-01-27 09:02:38 +00:00
|
|
|
height: 66rpx;
|
|
|
|
|
line-height: 66rpx;
|
2023-12-10 19:04:55 +00:00
|
|
|
font-size: 28rpx;
|
|
|
|
|
&.active{
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: $uni-color-primary;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|