You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
866 B
43 lines
866 B
<template>
|
|
<div class="facility-item">
|
|
<img :src="facility.imgUrl" @click="handleFacility" class="facility-icon" alt="" />
|
|
<span class="facility-name">{{ switchLanguage(facility, 'title') }}</span>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
const props = defineProps({
|
|
facility: {
|
|
type: Object,
|
|
default: () => ({})
|
|
}
|
|
})
|
|
|
|
const emits = defineEmits(['click'])
|
|
function handleFacility() {
|
|
emits('click', props.facility)
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.facility-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.facility-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.facility-name {
|
|
display: inline-block;
|
|
width: 48px;
|
|
font-weight: 700;
|
|
font-size: 12px;
|
|
line-height: 14px;
|
|
text-align: center;
|
|
color: var(--search-facNameColor, rgba(0, 0, 0, 0.6));
|
|
}
|
|
</style>
|
|
|