Skip to content

Commit

Permalink
[MCTB-7383] Fix paths with spaces (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzpro authored May 10, 2024
1 parent 1237a8c commit b586c3c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/types/json-object.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export default {
if (this.ordered.hasOwnProperty(key)) {
let value = this.ordered[key]
const path = key.includes(" ") ? `${this.path}['${key}']` : `${this.path}.${key}`;
elements.push(h(JsonBox, {
key,
props: {
Expand All @@ -126,7 +128,7 @@ export default {
forceExpand: this.forceExpand,
showArrayIndex: this.showArrayIndex,
showDoubleQuotes: this.showDoubleQuotes,
path: `${this.path}.${key}`,
path,
clickable: this.clickable,
},
on: {
Expand Down
21 changes: 20 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-json-viewer",
"version": "2.2.23",
"version": "2.2.24",
"description": "vuejs展示json的组件",
"main": "vue-json-viewer.js",
"files": [
Expand Down

0 comments on commit b586c3c

Please sign in to comment.