debug: add detailed logs for dynamicKeys computation
This commit is contained in:
@@ -70,14 +70,21 @@ const deleteTargetId = ref<number | null>(null)
|
|||||||
const batchDeleteDialogOpen = ref(false)
|
const batchDeleteDialogOpen = ref(false)
|
||||||
|
|
||||||
const dynamicKeys = computed(() => {
|
const dynamicKeys = computed(() => {
|
||||||
|
console.log('Computing dynamicKeys, records count:', records.value.length)
|
||||||
const keys = new Set<string>()
|
const keys = new Set<string>()
|
||||||
records.value.forEach((record) => {
|
records.value.forEach((record, index) => {
|
||||||
|
console.log(`Record ${index}:`, record)
|
||||||
const data = parseRecordData(record)
|
const data = parseRecordData(record)
|
||||||
|
console.log(`Record ${index} parsed data:`, data, 'type:', typeof data)
|
||||||
if (data && typeof data === 'object') {
|
if (data && typeof data === 'object') {
|
||||||
Object.keys(data).forEach(key => keys.add(key))
|
const recordKeys = Object.keys(data)
|
||||||
|
console.log(`Record ${index} keys:`, recordKeys)
|
||||||
|
recordKeys.forEach(key => keys.add(key))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return Array.from(keys).sort()
|
const result = Array.from(keys).sort()
|
||||||
|
console.log('Final dynamicKeys:', result)
|
||||||
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = computed<ColumnDef<VariableRecord>[]>(() => {
|
const columns = computed<ColumnDef<VariableRecord>[]>(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user