2025-05-01 21:38:35 +08:00
|
|
|
<script setup>
|
|
|
|
|
defineProps({
|
|
|
|
|
title: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: "",
|
|
|
|
|
},
|
|
|
|
|
value: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: "",
|
|
|
|
|
},
|
|
|
|
|
customStyle: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
},
|
2025-05-28 15:00:31 +08:00
|
|
|
onClick: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
2025-05-01 21:38:35 +08:00
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-06-15 15:53:57 +08:00
|
|
|
<view class="user-item" :style="customStyle" @click="onClick">
|
2025-05-01 21:38:35 +08:00
|
|
|
<text>{{ title }}</text>
|
|
|
|
|
<view>
|
2025-05-28 15:00:31 +08:00
|
|
|
<slot></slot>
|
2025-06-15 15:53:57 +08:00
|
|
|
<view v-if="onClick !== null">
|
2025-05-01 21:38:35 +08:00
|
|
|
<image src="../static/enter.png" mode="widthFix" />
|
2025-06-15 15:53:57 +08:00
|
|
|
</view>
|
2025-05-01 21:38:35 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.user-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
height: 55px;
|
|
|
|
|
border-bottom: 1px solid #f5f5f5;
|
|
|
|
|
}
|
|
|
|
|
.user-item > text {
|
|
|
|
|
margin-left: 15px;
|
|
|
|
|
font-size: 14px;
|
2025-06-15 22:01:06 +08:00
|
|
|
color: #000;
|
2025-05-01 21:38:35 +08:00
|
|
|
}
|
|
|
|
|
.user-item > view {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: #999;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
.user-item > view image {
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
}
|
2025-05-28 16:03:08 +08:00
|
|
|
.user-item > view button {
|
|
|
|
|
margin-left: 5px;
|
|
|
|
|
}
|
2025-05-01 21:38:35 +08:00
|
|
|
</style>
|