he wei
2025-06-06 895129470d7ee48183fc15b9ee18ef0880503e5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<template>
  <div class="power-state-box">
    <div class="icon-wrapper"><i class="iconfont" :class="icon"></i></div>
    <div class="power-state-text">{{ text1 }}<br />{{ text2 }}</div>
    <div class="power-state-light"><hdw-light :type="state"></hdw-light></div>
  </div>
</template>
 
<script>
import HdwLight from "@/components/HdwLight";
export default {
  name: "PowerStateBox",
  components: { HdwLight },
  props: {
    icon: {
      type: String,
      default: "el-icon-jiaoliudianyuan",
    },
    text1: {
      type: String,
      default: "交流电源",
    },
    text2: {
      type: String,
      default: "失电信号",
    },
    state: {
      type: Number,
      default: -1,
    },
  },
  data() {
    return {};
  },
};
</script>
 
<style scoped>
.power-state-box {
  margin: 8px;
  display: inline-block;
  border: 1px solid #00fefe;
}
.icon-wrapper {
  display: inline-block;
  width: 45px;
  height: 45px;
  text-align: center;
}
.power-state-text {
  display: inline-block;
  padding: 0 8px 0 2px;
  font-size: 12px;
  text-align: left;
}
.power-state-light {
  display: inline-block;
  padding: 0 8px;
}
.icon-wrapper .iconfont {
  line-height: 45px;
  font-size: 30px;
}
</style>