Fixed display issue on array

This commit is contained in:
liangping 2022-05-15 10:13:52 +08:00
parent 1c04357c93
commit f97ba6dbfc

View File

@ -1,7 +1,7 @@
<template>
<b-table
v-if="Array.isArray(tablefield)"
:items="tablefield"
v-if="Array.isArray(items)"
:items="items"
:sticky-header="true"
:no-border-collapse="true"
responsive="md"
@ -40,6 +40,14 @@ export default {
default: () => [],
},
},
computed: {
items() {
if (this.tablefield.length > 0 && typeof (this.tablefield[0]) === 'string') {
return this.tablefield.map(x => ({ array: x }))
}
return this.tablefield
},
},
methods: {
eval_value(value) {
if (typeof (value) === 'string') {