吉安感知网项目-前端
shuishen
2 days ago 6e88705bd5b443a259b24c17c8a299765d059d96
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
<!--
 * @Author       : yuan
 * @Date         : 2026-01-08 09:29:07
 * @LastEditors  : yuan
 * @LastEditTime : 2026-01-27 14:49:56
 * @FilePath     : \applications\drone-command\src\views\dataCockpit\components\RealWarning.vue
 * @Description  : 
 * Copyright 2026 OBKoro1, All Rights Reserved. 
 * 2026-01-08 09:29:07
-->
<template>
    <div class="real-warning" v-loading="props.loading" element-loading-background="rgba(5, 5, 15, 0.6)"
        element-loading-text="加载中...">
        <div class="list-content">
            <EmptyState v-if="!props.data.length && !props.loading" />
            <RealTemplate v-else v-for="(item, ind) in props.data" :key="ind" :data="item"
                @signal="emit('signal', item)" @counter="emit('counter', item)" @favorite="emit('favorite', item)" />
        </div>
    </div>
</template>
 
<script setup>
import RealTemplate from './templateComponents/RealTemplate.vue'
import EmptyState from './EmptyState.vue'
 
const props = defineProps({
    data: {
        type: Array,
        default: () => []
    },
    loading: {
        type: Boolean,
        default: false
    }
})
 
const emit = defineEmits(['signal', 'counter', 'favorite'])
</script>
 
<style lang="scss" scoped>
.real-warning {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
 
.list-content {
    height: 0;
    flex: 1;
    overflow-y: auto;
}
</style>