mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-20 20:00:37 +03:00
feat: support showArrayIndex
This commit is contained in:
@@ -20,6 +20,7 @@ export default {
|
||||
expand: Boolean,
|
||||
forceExpand: Boolean,
|
||||
previewMode: Boolean,
|
||||
showArrayIndex: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -101,11 +102,12 @@ export default {
|
||||
key,
|
||||
props: {
|
||||
sort: this.sort,
|
||||
keyName: `${key}`,
|
||||
keyName: this.showArrayIndex ? `${key}`: '',
|
||||
depth: this.depth + 1,
|
||||
value,
|
||||
previewMode: this.previewMode,
|
||||
forceExpand: this.forceExpand,
|
||||
showArrayIndex: this.showArrayIndex,
|
||||
}
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -20,6 +20,7 @@ export default {
|
||||
forceExpand: Boolean,
|
||||
sort: Boolean,
|
||||
previewMode: Boolean,
|
||||
showArrayIndex: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -117,6 +118,7 @@ export default {
|
||||
value,
|
||||
previewMode: this.previewMode,
|
||||
forceExpand: this.forceExpand,
|
||||
showArrayIndex: this.showArrayIndex,
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user