<template>
  <view class="card_cell_item" @click="toPage" :style="props?.itemStyle">
    <view class="label"> {{ props?.title }} </view>
    <view class="status" v-if="props?.status"> {{ props?.status }} </view>
    <view class="value" v-if="props?.value"> {{ props?.value }} </view>
    <view class="value" v-else><slot /></view>
  </view>
</template>
<script setup lang="ts">
const props = defineProps(['title', 'status', 'value', 'itemStyle', 'url'])
const emit = defineEmits(['click'])
const toPage = () => {
  if (props?.url) {
    uni.navigateTo({ url: props.url })
  }
  emit('click')
}
</script>
<style lang="scss" scoped>
.card_cell_item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 28rpx;
  padding: 0 0 30rpx 0;
  .label {
    color: #666;
    width: 120rpx;
  }
  .status {
    flex: 1;
    padding: 0 20rpx;
  }
}
</style>
