fix: bug#12259

This commit is contained in:
xieyonghong 2023-05-15 13:57:58 +08:00
parent 372ec43eb8
commit 19d7fadfbe
1 changed files with 19 additions and 16 deletions

View File

@ -45,7 +45,7 @@ const events = defineProps({
});
const instanceStore = useInstanceStore();
const columns = ref<Record<string, any>>([
const defaultColumns = [
{
title: '时间',
dataIndex: 'timestamp',
@ -60,8 +60,10 @@ const columns = ref<Record<string, any>>([
dataIndex: 'action',
key: 'action',
scopedSlots: true,
},
]);
}
]
const columns = ref<Array<Record<string, any>>>([...defaultColumns]);
const params = ref<Record<string, any>>({});
const visible = ref<boolean>(false);
const info = ref<Record<string, any>>({});
@ -70,6 +72,7 @@ const _getEventList = (_params: any) =>
getEventList(instanceStore.current.id || '', events.data.id || '', _params);
watchEffect(() => {
columns.value = [...defaultColumns]
if (events.data?.valueType?.type === 'object') {
(events.data.valueType?.properties || []).reverse().map((i: any) => {
columns.value.splice(0, 0, {