大屏标题组件封装

This commit is contained in:
jxj_yjl 2023-09-05 14:35:22 +08:00
parent 665b6a49f1
commit 0064f8362e
4 changed files with 25 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

View File

@ -1,7 +1,10 @@
<template>
<div class="h-card">
<div class="title">
<i>{{ title }}</i>
<div><img src="@/assets/images/titleIcon.png" alt="" /></div>
<div class="titltText">
<i>{{ title }}</i>
</div>
</div>
<div class="content">
<slot></slot>
@ -10,12 +13,11 @@
</template>
<script>
import { ref } from "vue";
export default {
props: ["title"],
setup(props) {
return {};
}
props: ["title"],
setup(props) {
return {};
}
};
</script>
@ -24,22 +26,27 @@ export default {
width: 100%;
height: 100%;
.title {
height: 15%;
line-height: 4vh;
text-align: left;
font-size: calc(100vw * 18 / 1920);
color: #ffffff;
background: url("@/assets/images/titleImg.webp") no-repeat;
background: url("@/assets/images/titleImg.png") no-repeat;
background-size: 100% 100%;
i {
margin-left: 45px;
font-family: OPPOSansH;
display: flex;
div {
font-size: calc(100vw * 18 / 1920);
color: #ffffff;
img {
width: 110%;
margin-left: 30%;
}
i {
font-family: OPPOSansH;
}
}
.titltText {
margin: 1% 0 0 2%;
}
}
.content {
margin-top: 10px;
height: calc(100% - 34px);
margin-top: 2%;
height: 88%;
background: url("@/assets/images/cardImg.png") no-repeat;
background-size: 100% 100%;
}