This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/src/components/charts/ChartTable.vue

52 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<div class="cn-chart cn-chart__table">
<div class="cn-chart__header">
<div class="header__title">
<slot name="title"></slot>
</div>
<div class="header__operations">
<slot name="operations"></slot>
</div>
</div>
<div class="cn-chart__body">
<el-table
style="width: 100%"
2021-06-21 20:33:39 +08:00
tooltip-effect="light"
:data="tableData"
>
<el-table-column
type="index"
label="#"
>
</el-table-column>
<el-table-column
v-for="(c, i) in tableColumns"
2021-06-21 20:33:39 +08:00
show-overflow-tooltip
:key="i"
:prop="c"
>
<template #header>{{c}}</template>
<template #default="{ row }">{{row[c]}}</template>
</el-table-column>
</el-table>
</div>
<div class="cn-chart__footer">
2021-06-21 20:33:39 +08:00
<slot name="footer"></slot>
</div>
</div>
</template>
<script>
export default {
name: 'ChartTable',
props: {
tableColumns: Array,
tableData: Array
}
}
</script>
<style>
</style>