MqttLogTable.vue
1.68 KB
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
65
66
67
68
69
70
71
72
73
74
75
<template>
<el-card>
<div slot="header">
<span>{{ $t('mqttLog.list.title') }}</span>
</div>
<el-table
v-loading="loading"
:data="data"
border
style="width: 100%"
>
<el-table-column
prop="mqttId"
:label="$t('mqttLog.table.id')"
align="center"
/>
<el-table-column
prop="businessId"
:label="$t('mqttLog.table.businessId')"
align="center"
/>
<el-table-column
prop="businessKey"
:label="$t('mqttLog.table.business')"
align="center"
/>
<el-table-column
prop="topic"
:label="$t('mqttLog.table.topic')"
align="center"
/>
<el-table-column
prop="context"
:label="$t('mqttLog.table.content')"
align="center"
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.context" placement="top">
<div class="text-ellipsis">{{ scope.row.context }}</div>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
prop="remark"
:label="$t('mqttLog.table.remark')"
align="center"
/>
</el-table>
</el-card>
</template>
<script>
export default {
name: 'MqttLogTable',
props: {
data: {
type: Array,
default: () => []
},
loading: {
type: Boolean,
default: false
}
}
}
</script>
<style scoped>
.text-ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 200px;
}
</style>