wupengfei
2025-12-01 6d8cde914540d6e2ecbd0fafda94be48af89c4da
packages/components/src/Card/TaskCard.vue
@@ -1,11 +1,13 @@
<template>
  <div class="task-card-wrapper">
  <div class="task-card-wrapper" :class="{ 'un-read': !isRead }">
    <div class="task-card-title-wrapper">
      <div class="task-card-title">{{ name }}</div>
      <slot name="title-right">
        <TaskPrice
          v-if="releaseStatus !== EnumTaskReleaseStatus.Stopped"
          :value="toThousand(serviceFee ?? 0)"
          :unit="BillingMethodEnumUnit[billingMethod]"
          :billingMethod="billingMethod"
        />
      </slot>
    </div>
@@ -120,10 +122,14 @@
  /** 创建时间 */
  createdTime?: string;
  hireStatus?: EnumTaskUserHireStatus;
  isRead?: boolean;
};
const props = withDefaults(defineProps<Props>(), {
  showActions: true,
  isRead: true,
});
const emit = defineEmits<{
@@ -140,6 +146,21 @@
  background-color: #fff;
  border-radius: 12px;
  &.un-read {
    position: relative;
    &::before {
      content: '';
      position: absolute;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background-color: red;
      right: 18px;
      top: 12px;
    }
  }
  &:last-child {
    margin-bottom: 0;
  }