File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 33
33
@click =" onBracketsClick"
34
34
/>
35
35
36
- <span v-else-if =" customValueFormatter" :class =" valueClass" v-html =" customFormatter (node.content)" ></span >
37
- <span v-else :class =" valueClass" v-text =" defaultFormatter (node.content)" />
36
+ <span v-else-if =" customValueFormatter" :class =" valueClass" v-html =" valueFormatter (node.content)" ></span >
37
+ <span v-else :class =" valueClass" v-text =" valueFormatter (node.content)" />
38
38
39
39
<span v-if =" showLength && collapsed" class =" vjs-comment" > // {{ node.length }} items </span >
40
40
</span >
@@ -132,16 +132,18 @@ export default {
132
132
defaultFormatter (data ) {
133
133
let text = data + ' ' ;
134
134
if (this .dataType === ' string' ) text = ` "${ text} "` ;
135
- return this .node .showComma ? ` ${ text} ,` : text;
136
- },
137
-
138
- customFormatter (data ) {
139
- const basic = this .customValueFormatter (
140
- data,
141
- this .node .key ,
142
- this .node .path ,
143
- this .defaultFormatter (data),
144
- );
135
+ return text;
136
+ },
137
+
138
+ valueFormatter (data ) {
139
+ const basic = this .customValueFormatter
140
+ ? this .customValueFormatter (
141
+ data,
142
+ this .node .key ,
143
+ this .node .path ,
144
+ this .defaultFormatter (data),
145
+ )
146
+ : this .defaultFormatter (data);
145
147
146
148
return this .node .showComma ? ` ${ basic} ,` : basic;
147
149
},
You can’t perform that action at this time.
0 commit comments