在数据大屏开发中,有些地方是不需要标题的,所以在之前的vue3 数据可视化大屏蓝色边框-浅蓝色异形边框基础上,做了去除标题处理,最后得到的就是下面的无标题平整的边框。
边框只有一个主体部分。
如果您需要设计属于自己的数据可视化大屏或数据可视化大屏开发 请联系我们微信:17331886870
组件处理
组件每个部位都尽可能的精细化处理,让其尽可能的适配不同宽高而不错位变形。
组件代码
/**
* @Author: 858834013@qq.com
* @Name: pageItem
* @Date: 2023年06月25日14:11:59
* @Desc: vue3 数据可视化大屏蓝色边框-浅蓝色边框
*/
<template>
<div class="pageItemBody">
<div class="itemMain">
<slot></slot>
</div>
<bg></bg>
</div>
</template>
<script>
import bg from './bg.vue'
export default {
name: "title",
data() {
return {}
},
components: {
bg
},
watch: {},
mounted() {
var that = this;
},
}
</script>
<style lang="scss" scoped>
.pageItemBody {
width: 100%;
position: relative;
height: 100%;
display: flex;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: nowrap;
flex-direction: column;
z-index: 1;
align-content: flex-start;
}
.itemMain {
position: relative;
width: 100%;
height: calc(100% - 0PX);
}
</style>
背景组件
/**
* @Author: 858834013@qq.com
* @Name: gridView
* @Date: 2023年06月25日14:12:04
* @Desc: 仿九宫背景
*/
<template>
<div class="gridView">
<!-- 左上角-->
<div class="gLeftTop"></div>
<!-- 顶部中间-->
<div class="gTopCenter"></div>
<!-- 右上角-->
<div class="gRightTop"></div>
<!-- 中间部分-->
<div class="gCenterMain">
<!-- 左侧中间-->
<div class="gLeftCenter"></div>
<!-- 右侧中间-->
<div class="gRightCenter"></div>
<!-- 中间-->
<div class="gCenter"></div>
</div>
<!-- 左下角-->
<div class="gLeftBottom"></div>
<!-- 底部中间-->
<div class="gBottomCenter"></div>
<!-- 右下角-->
<div class="gRightBottom"></div>
</div>
</template>
<script>
export default {
name: "gridView"
}
</script>
<style lang="scss" scoped>
.gridView {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
min-height: 80px;
min-width: 250px;
bottom: 0;
right: 0;
z-index: -1;
pointer-events: none; //避免div层被点击
//左上角
.gLeftTop {
background: url("./assets/left_top.png") no-repeat;
background-size: 100% 100%;
position: absolute;
left: 0;
width: 16PX;
height: 16PX;
}
//顶部中间
.gTopCenter {
width: calc(100% - 16PX - 16PX);
left: 16PX;
position: absolute;
height: 16PX;
background: url("./assets/top.png") repeat-x;
background-size: 100% 100%;
}
//右上角
.gRightTop {
background: url("./assets/right_top.png") no-repeat;
background-size: 100% 100%;
position: absolute;
right: 0;
top: 0;
width: 16PX;
height: 16PX;
}
//左下角
.gLeftBottom {
background: url("./assets/left_bottom.png") no-repeat;
background-size: 100% 100%;
position: absolute;
left: 0;
bottom: 0;
width: 16PX;
height: 16PX;
}
//底部中间
.gBottomCenter {
width: calc(100% - 16PX - 16PX);
left: 16PX;
bottom: 0;
position: absolute;
height: 16PX;
background: url("./assets/bottom.png") repeat-x;
background-size: 100% 100%;
}
//右下角
.gRightBottom {
background: url("./assets/right_bottom.png") no-repeat;
background-size: 100% 100%;
position: absolute;
right: 0;
bottom: 0;
width: 16PX;
height: 16PX;
}
//中间部分
.gCenterMain {
width: 100%;
height: calc(100% - 16PX - 16PX);
position: absolute;
top: 16PX;
bottom: 16PX;
//左侧中间
.gLeftCenter {
left: 0;
height: 100%;
position: absolute;
background: url("./assets/left_center.png") repeat-y;
background-size: 100%;
width: 10PX;
}
.gCenter {
width: calc(100% - 10PX - 10PX);
left: 10PX;
bottom: 0;
position: absolute;
height: 100%;
background: url("./assets/center.png") no-repeat;
background-size: 100% 100%;
}
//右侧中间
.gRightCenter {
height: 100%;
position: absolute;
right: 0;
background: url("./assets/right_center.png");
background-size: 100% 100%;
width: 10PX;
}
}
}
.zhuangshi {
position: absolute;
left: 0;
top: 20%;
z-index: 100;
img {
width: 5px;
height: 70px;
}
}
.line {
position: absolute;
left: 15%;
top: -21px;
z-index: 100;
img {
width: 136px;
height: 42px;
}
}
.line2 {
position: absolute;
left: 70%;
top: -21px;
z-index: 100;
img {
width: 136px;
height: 42px;
}
}
.line3 {
position: absolute;
left: -21px;
top: 60%;
z-index: 100;
img {
width: 43px;
height: 136px;
}
}
.line4 {
position: absolute;
right: -21px;
top: 30%;
z-index: 100;
img {
width: 43px;
height: 136px;
}
}
</style>
更多边框组件
项目应用
组件实例代码下载
项目代码 vue3 vite js nodejs 14