From 286f1b727856d6b32a8d237f353ae008f3076deb Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期二, 11 三月 2025 17:48:15 +0800 Subject: [PATCH] feat: 接口对接 --- packages/components/src/Card/FlexJobTopView.vue | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/packages/components/src/Card/FlexJobTopView.vue b/packages/components/src/Card/FlexJobTopView.vue index 63a0ef0..ba2b4fd 100644 --- a/packages/components/src/Card/FlexJobTopView.vue +++ b/packages/components/src/Card/FlexJobTopView.vue @@ -1,17 +1,23 @@ <template> <div :class="['flexJob-card-top-wrapper', size]"> - <UserAvatar :size="size === 'small' ? 50 : 60" class="flexJob-card-top-avatar" /> + <Avatar :src="avatarUrl" :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">{{ '娲嬫磱' }}</div> + <div class="flexJob-card-top-info-name">{{ name }}</div> <div class="flexJob-card-top-info-gender"> - <img v-if="1" :src="IconMale" class="flexJob-card-top-info-gender-icon" /> + <img + v-if="genderType === Gender.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">{{ '宸插疄鍚�' }}</div> + <div class="flexJob-card-top-info-auth">{{ isRealName ? '宸插疄鍚�' : '鏈疄鍚�' }}</div> </div> <slot name="detail"> - <div class="flexJob-card-top-info-detail">{{ '26宀� | 闈炲鐢� | 鏈 | 涓婂矖121娆�' }}</div> + <div class="flexJob-card-top-info-detail"> + {{ `${age}宀� | ${educationalLevel} | ${educationalLevel} | 涓婂矖${arrangeCount}娆 }} + </div> </slot> </div> </div> @@ -20,6 +26,8 @@ <script setup lang="ts"> import IconMale from '@/assets/mine/icon-male.png'; import IconFemale from '@/assets/mine/icon-female.png'; +import { AvatarImage, Gender } from '@12333/constants'; +import { Avatar } from '@12333/components'; defineOptions({ name: 'FlexJobTopView', @@ -27,10 +35,19 @@ type Props = { size?: 'normal' | 'small'; + + avatarUrl?: string; + name?: string; + genderType?: Gender; + age?: number; + educationalLevel?: string; + arrangeCount?: number; + isRealName?: boolean; }; const props = withDefaults(defineProps<Props>(), { size: 'normal', + avatarUrl: AvatarImage, }); </script> -- Gitblit v1.9.1