Fixed display issue on array
This commit is contained in:
parent
1c04357c93
commit
f97ba6dbfc
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<b-table
|
<b-table
|
||||||
v-if="Array.isArray(tablefield)"
|
v-if="Array.isArray(items)"
|
||||||
:items="tablefield"
|
:items="items"
|
||||||
:sticky-header="true"
|
:sticky-header="true"
|
||||||
:no-border-collapse="true"
|
:no-border-collapse="true"
|
||||||
responsive="md"
|
responsive="md"
|
||||||
@ -40,6 +40,14 @@ export default {
|
|||||||
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: {
|
methods: {
|
||||||
eval_value(value) {
|
eval_value(value) {
|
||||||
if (typeof (value) === 'string') {
|
if (typeof (value) === 'string') {
|
||||||
|
Loading…
Reference in New Issue
Block a user