<!--
|
* @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>
|