From f0ba4ae708d0cbd62a24bfacdcce00e5d0f8e01b Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期三, 13 八月 2025 09:19:31 +0800 Subject: [PATCH] feat: 接口对接 --- packages/components/src/Card/FlexJobTopView.vue | 37 ++++++++++++++++++++++++++----------- 1 files changed, 26 insertions(+), 11 deletions(-) diff --git a/packages/components/src/Card/FlexJobTopView.vue b/packages/components/src/Card/FlexJobTopView.vue index 4461f81..af58bf0 100644 --- a/packages/components/src/Card/FlexJobTopView.vue +++ b/packages/components/src/Card/FlexJobTopView.vue @@ -1,24 +1,24 @@ <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}娆 }} + {{ infoDetail }} </div> </slot> </div> @@ -30,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', @@ -38,19 +39,33 @@ 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, + 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"> -- Gitblit v1.9.1