<template>
    <view class="pretty-card">
        <view class="px-35 py-45">
            <uv-text :text="title" color="white" margin="-2px 0 20px 20px"/>
            <slot>
                <view class="fx-row fx-bet-cen text-primary text-xs font-[PingFang] font-thin">
                    <view style="max-width: 33vw" class="truncate">姓名:{{ userSnapshot.nickName }}</view>
                    <view>省份:{{ userSnapshot.location }}</view>
                    <!-- <view>类别:{{ userSnapshot.examType }}</view> -->
                     <view>
                      类别:
                      <ie-dict :dict-name="EnumDictName.EXAM_TYPE" :dict-value="userStore.userInfo.examType || '--'" />
                    </view>
                </view>
            </slot>
        </view>
    </view>
</template>

<script>
import {useInjectUserSnapshot} from "@/pagesOther/pages/ie/hooks/useUserSnapshotInjection";
import { useUserStore } from '@/store/userStore';
import { EnumDictName } from '@/common/enum';

export default {
    name: "pretty-card",
    props: {
        title: {
            type: String,
            default: '我的信息'
        }
    },
    setup() {
        const {userSnapshot} = useInjectUserSnapshot()
        const userStore = useUserStore();
        return {
            userSnapshot,
            userStore,
            EnumDictName
        }
    }
}
</script>

<style scoped>
.pretty-card {
    width: 100vw;
    height: 112px;

    background-image: url('@/static/ie/index/bg-card.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
</style>
