zhengyiming
4 天以前 acd6c55ea7b11e06130c20bcd5ffd98c8e880a1f
packages/components/src/Card/FlexJobTopView.vue
@@ -1,24 +1,28 @@
<template>
  <div :class="['flexJob-card-top-wrapper', size]">
    <Avatar :src="avatarUrl" :size="size === 'small' ? 50 : 60" class="flexJob-card-top-avatar" />
    <Avatar :src="avatar" :size="size === 'small' ? 50 : 60" class="flexJob-card-top-avatar" />
    <div class="flexJob-card-top-info">
      <div class="flexJob-card-top-info-item">
        <div class="flexJob-card-top-info-name">{{ name }}</div>
        <div class="flexJob-card-top-info-gender">
          <img
            v-if="genderType === EnumUserGender.Male"
            v-if="gender === EnumUserGender.Male"
            :src="IconMale"
            class="flexJob-card-top-info-gender-icon"
          />
          <img v-else :src="IconFemale" class="flexJob-card-top-info-gender-icon" />
        </div>
        <div class="flexJob-card-top-info-auth" :class="{ 'is-real-name': isRealName }">
          {{ isRealName ? '已实名' : '未实名' }}
        <div class="flexJob-card-top-info-auth" :class="{ 'is-real-name': isReal }">
          {{ isReal ? '已实名' : '未实名' }}
        </div>
      </div>
      <slot name="detail">
        <div class="flexJob-card-top-info-detail">
          {{ `${age}岁 | ${educationalLevel} |  ${educationalLevel} | 上岗${arrangeCount}次` }}
          {{
            `${age ? '' : `${age}岁|`}${personalIdentityContent ?? ''} |  ${
              educationalBackgroundContent ?? ''
            } | 上岗${taskCount ?? 0}次`
          }}
        </div>
      </slot>
    </div>
@@ -38,18 +42,19 @@
type Props = {
  size?: 'normal' | 'small';
  avatarUrl?: string;
  avatar?: string;
  name?: string;
  genderType?: EnumUserGender;
  gender?: EnumUserGender;
  age?: number;
  educationalLevel?: string;
  arrangeCount?: number;
  isRealName?: boolean;
  isReal?: boolean;
  personalIdentityContent?: string;
  educationalBackgroundContent?: string;
  taskCount?: number;
};
const props = withDefaults(defineProps<Props>(), {
  size: 'normal',
  avatarUrl: AvatarImage,
  avatar: AvatarImage,
});
</script>