zhengyiming
4 天以前 8bb30d6c524ff6c1b816d2113d967d4380c20967
packages/components/src/Card/FlexJobTopView.vue
@@ -18,11 +18,7 @@
      </div>
      <slot name="detail">
        <div class="flexJob-card-top-info-detail">
          {{
            `${age ? '' : `${age}岁|`}${personalIdentityContent ?? ''} |  ${
              educationalBackgroundContent ?? ''
            } | 上岗${taskCount ?? 0}次`
          }}
          {{ infoDetail }}
        </div>
      </slot>
    </div>
@@ -34,6 +30,7 @@
import IconFemale from '@/assets/mine/icon-female.png';
import { AvatarImage, EnumUserGender } from '@12333/constants';
import { Avatar } from '@12333/components';
import { computed } from 'vue';
defineOptions({
  name: 'FlexJobTopView',
@@ -55,7 +52,20 @@
const props = withDefaults(defineProps<Props>(), {
  size: 'normal',
  avatar: AvatarImage,
  personalIdentityContent: '',
  educationalBackgroundContent: '',
});
const infoDetail = computed(() =>
  [
    props.age > 0 ? `${props.age}岁` : '',
    props.personalIdentityContent,
    props.educationalBackgroundContent,
    props.taskCount > 0 ? `上岗${props.taskCount ?? 0}次` : '',
  ]
    .filter(Boolean)
    .join('|')
);
</script>
<style lang="scss">