<!-- 赏金与积分 -->
<template>
  <div class="default-width py-3">
    <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#fff" @update:model-value="getPositionList">
      <v-tab :value="1">{{ $t('publicRecruitment.myRecommendation') }}</v-tab>
      <v-tab :value="2">{{ $t('publicRecruitment.myRegistration') }}</v-tab>
    </v-tabs>
    <div class="mt-3">
      <!-- 我的推荐 -->
      <div v-if="tab === 1">
        <myRecommendation></myRecommendation>
      </div>
      <!-- 积分明细 -->
      <div v-if="tab === 2" class="pa-3 white-bgc" style="min-height: 600px; border-radius: 5px;">
        <myRegistration></myRegistration>
      </div>
    </div>
  </div>
</template>

<script setup>
import myRecommendation from './myRecommendation.vue'
import myRegistration from './myRegistration.vue'
import { useRoute } from 'vue-router'; const route = useRoute()
import { useRouter } from 'vue-router'; const router = useRouter()
import { ref } from 'vue'
defineOptions({name: 'personal-myPublicRecruitment-index'})
const tab = ref(+route.query?.tab || 1)
const getPositionList = () => {
  if (route.query) router.replace({ path: route.path }) // 不留记录的清除跳转带过来的参数
}
</script>
<style lang="scss" scoped>
</style>
