布局微调

master
许宏杰 8 months ago
parent ce12de4049
commit 1fb9e04d59

@ -1,9 +1,6 @@
<template> <template>
<div class="grid-item-main"> <div class="grid-item-main">
<div <div class="corlor-grid" :class="size">
class="corlor-grid"
:style="`width:${realWidth};height:${realHeight};`"
>
<div class="left-color" :style="{ background: item.leftColor }"></div> <div class="left-color" :style="{ background: item.leftColor }"></div>
<div class="rigth-color"> <div class="rigth-color">
<div :style="{ background: item.rightTopColor }"></div> <div :style="{ background: item.rightTopColor }"></div>
@ -23,19 +20,15 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
size: {
type: String,
default: "medium",
},
}, },
data() { data() {
return {}; return {};
}, },
methods: {}, methods: {},
computed: {
realWidth() {
return typeof this.width == "string" ? this.width : `${this.width}px`;
},
realHeight() {
return typeof this.height == "string" ? this.height : `${this.height}px`;
},
},
}; };
</script> </script>
@ -44,11 +37,17 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.medium {
.corlor-grid {
position: relative;
height: 20px; height: 20px;
width: 48px; width: 48px;
}
.small {
width: 35px;
height: 15px;
}
.corlor-grid {
position: relative;
border: 1px solid white; border: 1px solid white;
display: flex; display: flex;
align-items: center; align-items: center;

@ -46,5 +46,6 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background: #00448d;
} }
</style> </style>

@ -2,7 +2,12 @@
<div class="color-list"> <div class="color-list">
<div class="list-item" v-for="(item, index) in colorListL" :key="index"> <div class="list-item" v-for="(item, index) in colorListL" :key="index">
<div class="item-name"> <div class="item-name">
<ColorCell :item="item" v-if="item.color" style="margin-right: 12px" /> <ColorCell
:item="item"
v-if="item.color"
size="small"
class="color-item"
/>
<span> <span>
{{ item.name }} {{ item.name }}
<span v-show="item.name == ''" <span v-show="item.name == ''"
@ -64,7 +69,7 @@ export default {
} }
.item-value { .item-value {
span:nth-child(odd) { span:nth-child(odd) {
font-size: 16px; font-size: 15px;
color: #52ccff; color: #52ccff;
font-family: "DIN-Medium-2.otf"; font-family: "DIN-Medium-2.otf";
} }
@ -74,10 +79,13 @@ export default {
} }
} }
} }
& > .list-item:last-child {
border: 0;
}
.list-item:nth-child(9) .item-value, .list-item:nth-child(9) .item-value,
.list-item:nth-child(10) .item-value { .list-item:nth-child(10) .item-value {
span:nth-child(odd) { span:nth-child(odd) {
font-size: 16px; font-size: 15px;
color: #ffb400; color: #ffb400;
font-family: "DIN-Medium-2.otf"; font-family: "DIN-Medium-2.otf";
} }
@ -92,4 +100,7 @@ export default {
border: 0; border: 0;
} }
} }
.color-item {
margin-right: 10px;
}
</style> </style>

@ -190,7 +190,7 @@ export default {
.pie-chart { .pie-chart {
margin-top: 10px; margin-top: 10px;
// flex: 1; // flex: 1;
height: 20%; height: 23%;
display: flex; display: flex;
align-items: center; align-items: center;

@ -47,6 +47,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.cell-item { .cell-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

@ -82,9 +82,9 @@ export default {
options: { options: {
scene: { scene: {
center: { center: {
lat: 31.361807, lat: 31.344002,
lng: 121.115595, lng: 121.120196,
alt: 18625.9, alt: 21247.4,
heading: 355.1, heading: 355.1,
pitch: -53.8, pitch: -53.8,
}, },

Loading…
Cancel
Save