2025-01-06 15:16:45 +08:00
|
|
|
<template>
|
2025-01-06 15:52:23 +08:00
|
|
|
<view class="flex msb m-l-24 m-r-24 m-t-24 p-24 bg-w rad8 boxshadow" @click="handleClick">
|
2025-01-06 15:16:45 +08:00
|
|
|
<view class="flex mac l-h-18">
|
|
|
|
<view class="fz28 l-h-18">{{cellTit}}</view>
|
|
|
|
<view v-if="required===true" class="bg-m rad-c l-h-18 m-l-24 reqBox"></view>
|
|
|
|
</view>
|
|
|
|
<view class="fcb fz28 flex mac">
|
2025-01-14 19:12:24 +08:00
|
|
|
<view class="fz28" :class="conClass">{{cellCon}}</view>
|
2025-01-20 23:07:14 +08:00
|
|
|
<u-icon name="arrow-right" size="28rpx" v-if='isRightIcon'></u-icon>
|
2025-01-06 15:16:45 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: "cell",
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
//cell主标题
|
|
|
|
cellTit: {
|
|
|
|
type: String
|
|
|
|
},
|
2025-01-06 15:52:23 +08:00
|
|
|
//cell简单显示内容
|
|
|
|
cellCon: {
|
|
|
|
type: String
|
|
|
|
},
|
2025-01-14 19:12:24 +08:00
|
|
|
//cell内容标签的class
|
|
|
|
conClass: {
|
|
|
|
type: String
|
|
|
|
},
|
2025-01-06 15:16:45 +08:00
|
|
|
//是否显示 必填红点 默认不显示
|
|
|
|
required: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
2025-01-20 23:07:14 +08:00
|
|
|
},
|
|
|
|
//是否显示 向右的箭头
|
|
|
|
isRightIcon: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
2025-01-06 15:16:45 +08:00
|
|
|
}
|
2025-01-06 15:52:23 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleClick() {
|
|
|
|
// 触发点击事件,向父组件发送事件
|
|
|
|
this.$emit('click');
|
|
|
|
}
|
2025-01-06 15:16:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-01-06 15:52:23 +08:00
|
|
|
.reqBox {
|
2025-01-06 15:16:45 +08:00
|
|
|
width: 16rpx;
|
|
|
|
height: 16rpx;
|
|
|
|
}
|
|
|
|
</style>
|