首页重构列表已完成
This commit is contained in:
@@ -1,17 +1,37 @@
|
||||
<template>
|
||||
<view>{{ salaryText }}</view>
|
||||
<view>
|
||||
<view v-if="!minSalary || !maxSalary">面议</view>
|
||||
<view v-else class="texts">
|
||||
<text class="num">{{ minSalary / 1000 }}</text>
|
||||
<text class="unit">k</text>
|
||||
<text class="gap">~</text>
|
||||
<text class="num">{{ maxSalary / 1000 }}</text>
|
||||
<text class="unit">k</text>
|
||||
</view>
|
||||
</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`;
|
||||
});
|
||||
import { inject, computed } from "vue";
|
||||
import useDictStore from "../../stores/useDictStore";
|
||||
const { minSalary, maxSalary } = defineProps(["minSalary", "maxSalary"]);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.texts{
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
.num{
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.unit{
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.gap{
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user