add home-map

This commit is contained in:
DESKTOP-FUDKNA8\znjsz
2024-04-08 16:55:11 +08:00
parent 15b6281347
commit 1e734579df
6 changed files with 310 additions and 57 deletions

View File

@@ -0,0 +1,110 @@
<!--
filename: CompanyInfo.vue
author: liubin
date: 2024-04-08 15:27:04
description:
-->
<template>
<div class="company-info" :style="styles">
<div class="corner bl"></div>
<div class="corner br"></div>
<h2>{{ info.companyName }}</h2>
<ul>
<li v-for="item in info.items" :key="item.label">
{{ item.label }} {{ item.value }}
</li>
</ul>
</div>
</template>
<script>
export default {
name: "CompanyInfo",
components: {},
props: {
info: {
type: Object,
required: true,
default: () => ({}),
},
position: {
type: Object,
required: true,
default: () => ({ x: 0, y: 0 }),
},
},
data() {
return {};
},
computed: {
styles() {
return {
left: `${this.position.x}%`,
top: `${this.position.y}%`,
};
},
},
methods: {},
};
</script>
<style scoped lang="scss">
@font-face {
font-family: 优设标题黑;
src: url(../../../assets/YouSheBiaoTiHei-2.ttf);
}
.company-info {
color: #fff;
background: #4443;
position: absolute;
z-index: 9999;
padding: 14px;
backdrop-filter: blur(2px);
border-radius: 4px;
transform: translate(-50%, -100%);
box-shadow: inset 0 0 12px 2px #fff3;
}
h2 {
margin: 6px 0;
font-family: 优设标题黑;
color: #fff;
font-size: 24px;
}
ul,
li {
padding: 0;
margin: 0;
list-style: none;
}
ul {
display: flex;
flex-direction: column;
gap: 6px;
}
.corner {
position: absolute;
bottom: 0;
width: 12px;
height: 12px;
border-style: solid;
border-color: transparent;
}
.bl {
left: 0;
border-left: 3px solid #ffa600;
border-bottom: 3px solid #ffa600;
}
.br {
right: 0;
border-right: 3px solid #ffa600;
border-bottom: 3px solid #ffa600;
}
</style>