Commit b08794ad authored by xinzhedeai's avatar xinzhedeai

fix: 样式优化,字体调整

parent 4be95e7d
......@@ -55,8 +55,8 @@ export default {
}).then((response) => {
this.chartData = response.data;
this.$nextTick(() => {
this.initCharts();
})
this.initCharts();
});
});
},
getListData(type) {
......@@ -77,7 +77,7 @@ export default {
option = {
legend: {
top: 25,
right: '2%', // 靠右
right: "8%", // 靠右
icon: "rect", // 设置为圆形图标
itemWidth: 10, // 图标宽度
itemHeight: 10, // 图标高度
......@@ -89,27 +89,27 @@ export default {
align: "left",
textStyle: {
color: "#fff", // 设置字体颜色
fontSize: 14, // 设置字体大小
fontSize: "0.16rem", // 设置字体大小
},
itemStyle: {
color: "#1f8fff",
},
},
tooltip: {
trigger: 'axis',
trigger: "axis",
axisPointer: {
type: 'cross',
type: "cross",
label: {
backgroundColor: '#6a7985'
}
}
backgroundColor: "#6a7985",
},
},
},
toolbox: {},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
right: '8%',
right: "8%",
containLabel: true,
},
xAxis: [
......@@ -152,24 +152,28 @@ export default {
],
};
option.xAxis[0].data = this.chartData.xaxis;
option.series = this.chartData.series.map((item)=>{
return {
name: item.name,
type: "line",
stack: "Total",
lineStyle: {
color: "#1f8fff",
},
areaStyle: {
color: "#1e84e8",
},
emphasis: {
focus: "series",
},
data: item.data,
}
option.series = this.chartData.series.map((item) => {
return {
name: item.name,
type: "line",
stack: "Total",
lineStyle: {
color: "#1f8fff",
},
areaStyle: {
color: "#1e84e8",
},
emphasis: {
focus: "series",
},
data: item.data,
};
});
myChart.setOption(option);
// 窗口大小变化时重新调整图表布局
window.addEventListener("resize", function () {
myChart.resize(); // 调用resize方法
});
},
},
};
......@@ -229,11 +233,12 @@ export default {
justify-content: center;
align-items: center;
font-family: "diget year";
font-size: 0.26rem;
font-size: 0.36rem;
text-shadow: 0px 3px 12px rgba(24, 153, 159, 0.82);
background: linear-gradient(180deg, #ffffff 0%, #00ffc6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
color: #fff;
}
}
> div:nth-child(2) {
......@@ -377,7 +382,7 @@ export default {
height: 100%;
line-height: 0.48rem;
margin: 0;
font-size: 0.22rem;
font-size: 0.2rem;
letter-spacing: 0.01rem;
padding-left: 0.4rem;
font-family: Source Han Sans SC;
......
......@@ -185,7 +185,7 @@ export default {
height: 100%;
line-height: 0.48rem;
margin: 0;
font-size: 0.22rem;
font-size: 0.2rem;
letter-spacing: 0.01rem;
padding-left: 0.4rem;
font-family: Source Han Sans SC;
......@@ -232,7 +232,7 @@ export default {
span:nth-child(1) {
font-family: PingFang SC;
font-weight: 500;
font-size: 0.22rem;
font-size: 0.18rem;
// color: #ffffff;
margin-right: 0.3rem;
}
......@@ -302,7 +302,7 @@ export default {
font-family: PingFang SC;
font-weight: 500;
font-size: 0.18rem;
font-size: 0.17rem;
text-align: center;
background: linear-gradient(
0deg,
......
......@@ -23,7 +23,7 @@
v-for="(item, index) in dataList"
:key="index"
>
<span style="color:#fff;">{{ item.monName }}</span>
<span style="color:#fff;" class="ellipsis">{{ item.monName }}</span>
<span :style="{ color: colorBlock[index] }">{{
item.monDate
}}</span>
......@@ -269,6 +269,12 @@ export default {
</script>
<style scoped lang="scss">
.ellipsis {
width: 90%; /* 设置容器宽度 */
white-space: nowrap; /* 防止文本换行 */
overflow: hidden; /* 隐藏超出容器的文本 */
text-overflow: ellipsis; /* 当文本溢出容器时显示省略号 */
}
.emptyData {
font-size: 0.18rem;
text-align: center;
......@@ -339,7 +345,7 @@ export default {
height: 100%;
line-height: 0.48rem;
margin: 0;
font-size: 0.22rem;
font-size: 0.2rem;
letter-spacing: 0.01rem;
padding-left: 0.4rem;
font-family: Source Han Sans SC;
......
......@@ -20,7 +20,7 @@
:key="index"
class="suidao-item"
>
<span class="ellipsis">{{ item.monName }}时间框里东方红路水电费收快递费就</span>
<span class="ellipsis">{{ item.monName }}</span>
<span>{{ item.monDate }}</span>
<span>{{ item.monNumber }}</span>
</dd>
......@@ -97,6 +97,12 @@ export default {
const content = document.querySelector(contentClass);
var affixHeight = 10;
if(this.dataList.length<5){
content.style.transform = `translateY(0px)`;
clearInterval(this["interval4" + type]);
return
}
if (this["interval4" + type]) {
clearInterval(this["interval4" + type]);
}
......@@ -160,7 +166,7 @@ export default {
height: 100%;
line-height: 0.48rem;
margin: 0;
font-size: 0.22rem;
font-size: 0.2rem;
letter-spacing: 0.01rem;
padding-left: 0.4rem;
font-family: Source Han Sans SC;
......@@ -191,7 +197,7 @@ export default {
display: grid;
font-family: PingFang SC;
font-weight: 500;
font-size: 0.18rem;
font-size: 0.17rem;
text-align: right;
grid-template-columns: 1.4rem 1.8rem 1rem;
......
......@@ -304,12 +304,14 @@ footer{
display: flex;
justify-content: start;
gap: 0.02rem;
padding-top: 0.2rem;
align-items: center;
padding-top: 0.1rem;
padding-left: 1.3rem;
align-items: start;
flex-direction: column;
background: pink;
background: url("../assets/images/dpNew3/icon5.png");
background-repeat: no-repeat;
background-position-x: 0.5rem;
span{
font-size: 0.16rem;
color: #fff;
......@@ -380,7 +382,7 @@ footer{
height: 0.5rem;
font-size: 0.22rem;
font-weight: bold;
color: #26d4ff;
color: #fff;
background-image: url("../assets/images/bigscreen/button_normal.png");
background-repeat: no-repeat;
background-position: center;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment