邓洁: 修改低报

This commit is contained in:
邓洁
2024-01-08 12:13:25 +08:00
parent ff7d36077b
commit c9ee853953
2 changed files with 23 additions and 9 deletions

View File

@@ -41,14 +41,28 @@ const setValue = () => {
value.value.style.width = `${width}px`;
let flag = (params.wp.point * length.value.offsetWidth) / params.wp.max;
point.value.style.left = `${flag}px`;
if (width >= flag) {
value.value.style.background =
"linear-gradient(270deg, #FB3838 0%, #E98526 100%)";
} else {
value.value.style.background =
"linear-gradient(270deg, #38CAFB 0%, #E9D726 100%)";
if(params.wp.name=='氧气'){
if (width < flag) {
value.value.style.background =
"linear-gradient(270deg, #FB3838 0%, #E98526 100%)";
} else {
value.value.style.background =
"linear-gradient(270deg, #38CAFB 0%, #E9D726 100%)";
}
isWaring.value = params.wp.value < params.wp.point;
}else {
if (width >= flag) {
value.value.style.background =
"linear-gradient(270deg, #FB3838 0%, #E98526 100%)";
} else {
value.value.style.background =
"linear-gradient(270deg, #38CAFB 0%, #E9D726 100%)";
}
isWaring.value = params.wp.value >= params.wp.point;
}
isWaring.value = params.wp.value >= params.wp.point;
}
// let isWaring = computed(() => {
// return params.wp.value >= params.wp.point;

View File

@@ -42,7 +42,7 @@ function setValue() {
value.value.style.width = `${width}px`;
let flag = (params.wp.point * length.value.offsetWidth) / params.wp.max;
point.value.style.left = `${flag}px`;
if (width >= flag) {
if (width < flag) {
value.value.style.background = "#F53839";
} else {
value.value.style.background = "#60DDDE";
@@ -50,7 +50,7 @@ function setValue() {
}
let isWaring = computed(() => {
return params.wp.value >= params.wp.point;
return params.wp.value < params.wp.point;
});
</script>