bug
This commit is contained in:
@@ -107,7 +107,9 @@ export default {
|
||||
watch: {
|
||||
values: {
|
||||
immediate: true,
|
||||
deep: true, handler() {
|
||||
deep: true, handler(v) {
|
||||
|
||||
console.log(v)
|
||||
if (this.currentType == 'map') {
|
||||
// this.renderMap()
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
const keys = Object.keys(res.data[0])
|
||||
const list = res.data
|
||||
let dynamicData = []
|
||||
if (item.type === 'table') {
|
||||
if (item.type === 'table' || item.type === 'AiDvTable') {
|
||||
dynamicData = keys.map(v => {
|
||||
let obj = {}
|
||||
list.forEach((item, index) => {
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
|
||||
methods: {
|
||||
init (value) {
|
||||
console.log(this.config)
|
||||
if (!value.length) {
|
||||
this.header = []
|
||||
this.body = []
|
||||
@@ -95,24 +94,19 @@
|
||||
|
||||
const headerKey = Object.keys(value[0])[0]
|
||||
const bodyKey = Object.keys(value[0]).filter(v => {
|
||||
return v !== headerKey && ['color', 'width', 'align'].indexOf(v) === -1
|
||||
return v !== headerKey
|
||||
})
|
||||
|
||||
this.header = value.map(v => {
|
||||
return {
|
||||
v: v[headerKey],
|
||||
align: v.align,
|
||||
width: Number(v.width || 0) ? (Number(v.width || 0) + (this.isShowIndex === '1' ? 0 : 0)) : ''
|
||||
v: v[headerKey]
|
||||
}
|
||||
})
|
||||
|
||||
this.body = bodyKey.map(v => {
|
||||
return value.map(e => {
|
||||
return {
|
||||
v: e[v],
|
||||
color: e.color,
|
||||
align: e.align,
|
||||
width: e.width || ''
|
||||
v: e[v]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user