123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <div class="position-box">
- <div class="sub-li" v-for="(item, index) in list" :key="index" @mouseenter="item.active = true" @mouseleave="item.active = false">
- <div class="job-info">
- <div class="sub-li-top">
- <div class="sub-li-info">
- <p :class="['name', {'default-active': item.active }]">{{ item.name }}</p>
- <v-chip size="x-small" color="error" label variant="outlined" class="mr-1">急聘</v-chip>
- <v-chip size="x-small" color="warning" label variant="outlined">NEW</v-chip>
- </div>
- <p class="salary">{{ item.payFrom }}-{{ item.payTo }}/{{ item.payName }}</p>
- </div>
- <div style="height: 24px;overflow: hidden;">
- <v-chip size="x-small" label v-for="(k, i) in item.tagList" :key="i" class="mr-1" color="#666">{{ k }}</v-chip>
- </div>
- <div>
- <v-chip size="x-small" label v-for="(j, i) in desc" :key="i" class="mr-1" color="#666" :prepend-icon="j.mdi">{{ item[j.value] }}</v-chip>
- </div>
- </div>
- <div class="sub-li-bottom">
- <div class="user-info">
- <div class="d-flex align-center">
- <v-img src="../../assets/logo.png" width="40" style="height: 40px;" />
- <span class="names ml-2" style="font-size: 14px">{{ item.anotherName }}</span>
- </div>
- <p class="names float-right">
- <span>{{ item.industryName }}</span>
- <span class="vline"></span>
- <span>{{ item.scaleName }}</span>
- </p>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- defineOptions({ name: 'position-card-item' })
- import { ref, watch } from 'vue'
- const props = defineProps({
- items: {
- type: Array,
- default: () => []
- }
- })
- const list = ref([])
- watch(
- () => props.items,
- (newVal) => {
- list.value = newVal
- },
- { immediate: true },
- { deep: true }
- )
- const desc = [
- { mdi: 'mdi-map-marker-outline', value: 'areaName' },
- { mdi: 'mdi-school-outline', value: 'eduName' },
- { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
- ]
- </script>
- <style lang="scss" scoped>
- .position-box {
- display: flex;
- flex-wrap: wrap;
- }
- .sub-li {
- position: relative;
- width: calc((100% - 24px) / 3);
- min-width: calc((100% - 24px) / 3);
- max-width: calc((100% - 24px) / 3);
- margin: 0 12px 12px 0;
- height: 165px;
- border-radius: 12px;
- padding: 0;
- overflow: hidden;
- cursor: pointer;
- transition: all .2s linear;
- background-color: #fff;
- &:nth-child(3n) {
- margin-right: 0;
- }
- &:hover {
- box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
- }
- }
- .job-info {
- padding: 16px 20px;
- }
- .sub-li-top {
- display: flex;
- width: 100%;
- align-items: center;
- margin-bottom: 12px;
- }
- .sub-li-info {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- height: 22px;
- overflow: hidden;
- flex: 1;
- }
- .salary {
- font-size: 16px;
- font-weight: 700;
- color: #fe574a;
- line-height: 22px;
- flex: none;
- }
- .job-text {
- white-space: normal;
- padding-right: 0;
- height: 22px;
- line-height: 22px;
- overflow: hidden;
- word-break: break-all;
- max-width: none;
- }
- .sub-li-info .name {
- position: relative;
- max-width: 200px;
- margin-right: 8px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: 600;
- &:hover {
- color: var(--v-primary-base);
- }
- }
- .sub-li-bottom {
- position: absolute;
- width: 100%;
- bottom: -6px;
- left: 0;
- background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
- margin-top: 10px;
- padding-top: 0;
- display: block;
- border: none;
- }
- .user-info {
- display: flex;
- padding: 12px 20px;
- align-items: center;
- justify-content: space-between;
- }
- .names {
- color: #666;
- font-size: 13px;
- }
- .vline {
- display: inline-block;
- width: 1px;
- height: 10px;
- vertical-align: middle;
- background-color: #e0e0e0;
- margin: 0 10px;
- }
- </style>
|