From 8bb30d6c524ff6c1b816d2113d967d4380c20967 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期二, 12 八月 2025 17:41:49 +0800 Subject: [PATCH] fix: 灵工管理 --- packages/components/src/Card/FlexJobTopView.vue | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/components/src/Card/FlexJobTopView.vue b/packages/components/src/Card/FlexJobTopView.vue index 754b80d..af58bf0 100644 --- a/packages/components/src/Card/FlexJobTopView.vue +++ b/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"> -- Gitblit v1.9.1