<template>
|
<div class="w-full">
|
<span class="text-base font-bold">{{ data.title }}</span>
|
<el-table ref="tableRefList" class="w-full mt-5" :data="[{}]" cellClassName="text-sm" headerCellClassName="text-sm">
|
<el-table-column v-for="(col, index) in data.values" :label="col.title" :key="index">
|
<template #default="scope">
|
{{ col?.value }}
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
import type { TableInstance } from 'element-plus';
|
import { onMounted, ref } from 'vue';
|
import { chatComProps } from '../../../common';
|
|
const props = defineProps(chatComProps);
|
|
const tableRef = ref<TableInstance>();
|
const doTableLayout = () => {
|
tableRef.value?.doLayout();
|
};
|
onMounted(() => {
|
setTimeout(() => {
|
doTableLayout();
|
}, 300);
|
});
|
</script>
|
<style scoped lang="scss"></style>
|