heli-mes/mes-ui/mes-echarts/src/views/btmright.vue
2025-01-09 18:29:48 +08:00

88 lines
1.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div id="center">
<btmcenter />
<rightbot2 />
</div>
</template>
<script>
import btmcenter from "./btmcenter.vue";
import rightbot2 from "./rightbot2.vue";
export default {
components: {
btmcenter,
rightbot2
},
data() {
return {
config: {
number: [10304080], //初始数据
content: "{nt}",
style: {
//这里可以修改默认样式
fontSize: 30, //字体大小
fill: "#FFFFFF", //字体颜色
},
},
};
},
mounted() {
setInterval(() => {
this.power(3);
}, 1000);
// this.drawLine();
},
created() {},
methods: {
formatNumber(number) {
console.log("1111111");
const numbers = number.toString().split("").reverse();
const segs = [];
while (numbers.length) segs.push(numbers.splice(0, 3).join(""));
return segs.join(",").split("").reverse().join("");
},
power(n) {
// this.config.number[0] = Math.floor(Math.random() * n + 1);
this.config.number[0] += n;
this.config = { ...this.config }; //对象解构更新props
},
},
};
</script>
<style lang="scss" scoped>
#center {
width: 100%;
// color: #33cc99;
.dv-border-box-13 {
width: 100%;
height: 180px;
padding: 0 20px;
padding-top: 20px;
.dvrow {
display: flex;
justify-content: space-between;
}
.broken {
width: 98%;
height: 120px;
}
}
}
.fontsty {
display: inline-block;
width: 380px;
font-size: 35px;
letter-spacing: 15px;
text-align: right;
color: #fff;
font-weight: 700;
margin-top: 20px;
}
.w {
font-weight: 700;
}
</style>