| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <template>
- <div class="l-grid--info medium">
- <sensor
- type="temperature"
- title="温度"
- color="#ff0000"
- />
- <sensor
- type="smoke"
- title="烟雾"
- color="#8400ff"
- />
- <sensor
- type="flooding"
- title="水浸"
- />
- <sensor
- type="light"
- title="光照"
- color="#ffa200"
- />
- </div>
- </template>
- <script>
- import {
- startSensor,
- stopSensor
- } from '../../../monitor'
- import Sensor from './Sensor'
- export default {
- name: 'Sensors',
- components: {
- Sensor
- },
- props: {
- device: {
- type: Object,
- required: true
- }
- },
- created () {
- startSensor()
- },
- beforeDestroy () {
- stopSensor()
- }
- }
- </script>
|