update
This commit is contained in:
parent
430b4048e7
commit
e03f9e5178
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
BIN
src/assets/images/box-title-r.png
Normal file
BIN
src/assets/images/box-title-r.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
@ -148,7 +148,9 @@ function addMarks(text) {
|
||||
label.element.style.backgroundColor = '#fff';
|
||||
label.element.innerText = text;
|
||||
scene.add(label);
|
||||
|
||||
// 调整显示方向
|
||||
// 假设我们要将HTML元素旋转90度绕Y轴,使其从正前方指向右方
|
||||
label.rotation.set(-Math.PI / 4,0, 0);
|
||||
|
||||
//定义标记点
|
||||
var radius = 0.5, segemnt = 16, rings = 16;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="item-container">
|
||||
<div class="box-title">{{ prop.title }}</div>
|
||||
<div class="box-title" :class="[prop.pos == 'left'?'pos-l':'pos-r']">{{ prop.title }}</div>
|
||||
<div class="content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
@ -14,6 +14,10 @@ const prop = defineProps({
|
||||
type: String,
|
||||
default: '标题'
|
||||
},
|
||||
pos: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -29,7 +33,14 @@ const prop = defineProps({
|
||||
font-size: 20px;
|
||||
line-height: 40px;
|
||||
color: #fff;
|
||||
background: url('/src/assets/images/box-title.png') no-repeat center center / 100% 100%;
|
||||
}
|
||||
.pos-l {
|
||||
background: url('/src/assets/images/box-title-l.png') no-repeat center center / 100% 100%;
|
||||
}
|
||||
.pos-r {
|
||||
background: url('/src/assets/images/box-title-r.png') no-repeat center center / 100% 100%;
|
||||
text-align: right;
|
||||
padding-right: 25px;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
|
@ -88,7 +88,7 @@ option = {
|
||||
data: [
|
||||
{
|
||||
value: 100,
|
||||
},{
|
||||
}, {
|
||||
value: 100,
|
||||
}
|
||||
|
||||
@ -98,6 +98,4 @@ option = {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
@ -41,16 +41,16 @@
|
||||
</div>
|
||||
<div class="r-box">
|
||||
<div class="rbox-item">
|
||||
<ItemVue title="温湿度">
|
||||
<ItemVue title="温湿度" pos="right">
|
||||
<LineChart />
|
||||
</ItemVue>
|
||||
</div>
|
||||
<div class="rbox-item">
|
||||
<ItemVue title="温湿度">
|
||||
<ItemVue title="温湿度" pos="right">
|
||||
</ItemVue>
|
||||
</div>
|
||||
<div class="rbox-item">
|
||||
<ItemVue title="温湿度">
|
||||
<ItemVue title="温湿度" pos="right">
|
||||
</ItemVue>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user