邓洁 : 右侧鼠标经过效果
This commit is contained in:
@@ -18,57 +18,64 @@ import GasInfoItem from "./childComps/GasInfoItem.vue";
|
||||
const gasInfo = reactive({
|
||||
name: "一氧化硫", //气体名称
|
||||
max: 100, //最大值
|
||||
value: 10, //传感器值
|
||||
value: 60, //传感器值
|
||||
point: 50, //阈值
|
||||
});
|
||||
const gasInfo2 = reactive({
|
||||
name: "一氧化氮", //气体名称
|
||||
max: 100, //最大值
|
||||
value: 10, //传感器值
|
||||
value: 40, //传感器值
|
||||
point: 10, //阈值
|
||||
});
|
||||
const gasInfo3 = reactive({
|
||||
name: "一氧化碳", //气体名称
|
||||
max: 100, //最大值
|
||||
value: 10, //传感器值
|
||||
value: 15, //传感器值
|
||||
point: 70, //阈值
|
||||
});
|
||||
const gasInfo4 = reactive({
|
||||
name: "二氧化碳", //气体名称
|
||||
max: 100, //最大值
|
||||
value: 10, //传感器值
|
||||
value: 25, //传感器值
|
||||
point: 40, //阈值
|
||||
});
|
||||
const gasInfo5 = reactive({
|
||||
name: "硫化氢", //气体名称
|
||||
max: 100, //最大值
|
||||
value: 10, //传感器值
|
||||
value: 30, //传感器值
|
||||
point: 20, //阈值
|
||||
});
|
||||
const gasInfo6 = reactive({
|
||||
name: "二氧化硫", //气体名称
|
||||
max: 100, //最大值
|
||||
value: 10, //传感器值
|
||||
value: 20, //传感器值
|
||||
point: 20, //阈值
|
||||
});
|
||||
setInterval(() => {
|
||||
gasInfo.value = parseInt(Math.random() * 10) * 10;
|
||||
gasInfo2.value = parseInt(Math.random() * 10) * 10;
|
||||
gasInfo3.value = parseInt(Math.random() * 10) * 10;
|
||||
gasInfo4.value = parseInt(Math.random() * 10) * 10;
|
||||
gasInfo6.value = parseInt(Math.random() * 10) * 10;
|
||||
gasInfo5.value = parseInt(Math.random() * 10) * 10;
|
||||
}, 2000);
|
||||
const props = defineProps({
|
||||
list: Array
|
||||
});
|
||||
watch(() => props.list, (now, old) => {
|
||||
console.log('传感器 ', now, old)
|
||||
// wpList.value=now
|
||||
}, {deep: true});
|
||||
// setInterval(() => {
|
||||
// gasInfo.value = parseInt(Math.random() * 10) * 10;
|
||||
// gasInfo2.value = parseInt(Math.random() * 10) * 10;
|
||||
// gasInfo3.value = parseInt(Math.random() * 10) * 10;
|
||||
// gasInfo4.value = parseInt(Math.random() * 10) * 10;
|
||||
// gasInfo6.value = parseInt(Math.random() * 10) * 10;
|
||||
// gasInfo5.value = parseInt(Math.random() * 10) * 10;
|
||||
// }, 2000);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#bad-gas-info {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
width: 830px;
|
||||
width: 824px;
|
||||
height: 621px;
|
||||
top: 1441px;
|
||||
right: 62px;
|
||||
right: 72px;
|
||||
background-image: url(@/assets/images/badGasInfo/bg.png);
|
||||
.title {
|
||||
width: 128px;
|
||||
|
||||
Reference in New Issue
Block a user