<template>
    <view>{{ salaryText }}</view>
</template>

<script setup>
import { inject, computed } from 'vue';
import useDictStore from '../../stores/useDictStore';
const { minSalary, maxSalary, isMonth } = defineProps(['minSalary', 'maxSalary', 'isMonth']);

const salaryText = computed(() => {
    if (!minSalary || !maxSalary) return '面议';
    if (isMonth) {
        return `${minSalary}-${maxSalary}/月`;
    }
    return `${minSalary / 1000}k-${maxSalary / 1000}k`;
});
</script>
