2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-20 20:00:37 +03:00

fix array with 0 or ''

This commit is contained in:
陈峰
2019-08-27 16:42:52 +08:00
parent c7100f4a78
commit 3d4a0f49c5
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -51,7 +51,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.value.push(vals[index]); this.value.push(vals[index]);
if (vals[index + 1]) { if (this.value.length < vals.length) {
this.setValue(vals, index + 1); this.setValue(vals, index + 1);
} }
}, 0); }, 0);
@@ -94,7 +94,6 @@ export default {
innerHTML: '[' innerHTML: '['
} }
})) }))
this.ordered.forEach((value, key) => { this.ordered.forEach((value, key) => {
elements.push(h(JsonBox, { elements.push(h(JsonBox, {
key, key,
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "vue-json-viewer", "name": "vue-json-viewer",
"version": "2.2.1", "version": "2.2.2",
"description": "vuejs展示json的组件", "description": "vuejs展示json的组件",
"main": "vue-json-viewer.js", "main": "vue-json-viewer.js",
"files": [ "files": [