2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-08 17:22:32 +03:00

feat: array not sort

This commit is contained in:
风棋
2020-06-11 13:36:26 +08:00
parent 7f56c4b0c0
commit 6f4ade450a
2 changed files with 2 additions and 13 deletions
+1 -12
View File
@@ -24,17 +24,6 @@ export default {
sort: Boolean,
expand: Boolean
},
computed: {
ordered () {
let value = this.value
if (!this.sort) {
return value
}
return value.sort()
}
},
watch: {
jsonValue(newVal) {
this.setValue(newVal);
@@ -94,7 +83,7 @@ export default {
}
}))
if (this.expand) {
this.ordered.forEach((value, key) => {
this.value.forEach((value, key) => {
elements.push(h(JsonBox, {
key,
style: {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vue-json-viewer",
"version": "2.2.10",
"version": "2.2.11",
"description": "vuejs展示json的组件",
"main": "vue-json-viewer.js",
"files": [